How do I call my javascript after each wicket partial update?
if you want to execute a certain piece of js code after *every* (successful)
ajax update,
you can use the following js code:
wicketGlobalPostCallHandler = function {
alert('successful partial
update');
}
as "wicket user" already said, you can also add
javascript in serverside
code
using AjaxRequestTarget#appendJavascript
or #prependJavascript.
and there's still the option to use an
IAjaxCallDecorator.
----------------------------------------------------------------------------------------------------------------------------
IHeaderContributor (Wicket 1.3.2 API)
<noscript></noscript>
public interface IHeaderContributor
extends IClusterable
An interface to be implemented by components or behaviors that wish to
contribute to the header section of the page. Example:
class MyPanel extends Panel implements IHeaderContributor
{
public MyPanel(String id)
{
super(id);
}
public void renderHead(IHeaderResponse response)
{
response.renderOnLoadJavascript("alert('page loaded!');");
}
}
------------------------------------------------------------------------------------------------------------------------
Post or Get Request
return
e"POST".equals(((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getMethod());
分享到:
相关推荐
wicket开发指南,wicket 新型的web开发框架,现以能无逢支持jsr168/286
Wicket开发指南 Wicket开发指南 Wicket开发指南
Wicket has been around since 2004 and it has been an Apache project since 2007. During these years it has proved to be a solid and valuable solution for building enterprise web applications. Wicket ...
wicket国际化例子 含有wicket:message StringResourceModel 等读取properties资源文件的代码示例
wicket 开发指南 比较全面的介绍wicket的使用
wicket 基础知识培训,主要是讲解wicket入门知识,通过和struts比较来进行讲解。
wicket学习文档
Wicket 入门,以及Eclipse里建立project
wicket编译所需的maven库,搬运
wicket 6.x api.chm wicket帮助文档
wicket-menu.zip,Wicket菜单
wicket-examples 示例 wicket-examples 示例 wicket-examples 示例 wicket-examples 示例
从wicket官网中下载的wicket1.4.7中jar包,对于编写wicket相关的程序有所需要的朋友可以下载
wicket例子和开发指南,指南为PDF文档,例子为wicket自带例子。
wicket相关书籍 好东西啊
Wicket开发指南.pdf Wicket开发指南.pdf Wicket开发指南.pdfWicket开发指南.pdfWicket开发指南.pdf
Wicket,有一个优秀的Web框架。和Struts和Webwork类似的Java WEB开发框架。优点在于对HTML和业务代码进行了有效的分离(流行的WEB框架大多如此)。基于规则的配置(有效减少了XML配置文件的使用,与Spring相比,...
Wicket的Helloworld程序,基于其1.4jar包
wicket开发入门PDF
这是继wicket的简单实例之后,关于tree的简单用法,初学者可以下载下来学习如何生成树,以及树的使用