Html code
<html>
<body wicket:id="body">
// .....
</body>
</html>
Wicket Code
WebMarkupContainer body = new WebMarkupContainer("body");
AjaxEventBehavior loader = new AjaxEventBehavior("onload") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
target.appendJavaScript("alert('welcome on onload');");
}
};
body.add(loader);
<html>
<body wicket:id="body">
// .....
</body>
</html>
Wicket Code
WebMarkupContainer body = new WebMarkupContainer("body");
AjaxEventBehavior loader = new AjaxEventBehavior("onload") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
target.appendJavaScript("alert('welcome on onload');");
}
};
body.add(loader);
No comments:
Post a Comment