Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.3.3
-
None
-
None
-
WinXP (build 1.6.0_05-b13)
Description
The problem is originally raised here: http://www.nabble.com/Ajax-postcall-handler-does-not-get-called-every-time-td16659218.html#a16663054
0) Run the quickstart project
1) Close all browser windows, then open a browser
2) Visit the page (http://localhost:8080)
3) click the link, postcall handler is called as expected
4) any click again, postcall handler is not called
Now the strange part
0) Leave the browser window open, restart the quickstart project
1) Visit the page (http://localhost:8080)
2) click the link again and again and postcall handler is called every time as expected
IE7, FF 2.0.0.14, Safari and Opera and all the same.
AjaxRegisterPostCallHandler.java =====================================================
public class AjaxRegisterPostCallHandler extends WebPage {
private int count;
private static HeaderContributor headerCont = new HeaderContributor(new IHeaderContributor() {
public void renderHead(IHeaderResponse response) {
response
.renderOnLoadJavascript("Wicket.Ajax.registerPostCallHandler(function()
);");
}
});
public AjaxRegisterPostCallHandler() {
final WebMarkupContainer container = new WebMarkupContainer("container");
container.setOutputMarkupId(true);
add(container);
Label label = new Label("count", new AbstractReadOnlyModel() {
public Object getObject()
{ return count; } });
container.add(label);
container.add(new AjaxLink("link") {
public void onClick(AjaxRequestTarget target)
});
add(headerCont);
}
}
AjaxRegisterPostCallHandler.html ================================================
<html>
<head>
<title>Test</title>
</head>
<body>
<div wicket:id="container">
<div wicket:id="count"></div>
<a wicket:id="link">link</a>
</div>
</body>
</html>
Attachments
Issue Links
- is duplicated by
-
WICKET-2999 Packaged Resource URLs encoded with jsessionid
- Resolved