Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
8.0.0
-
None
-
None
Description
Inclusion of the wicket:message attribute on non-component markup prevents any children that have ajax behaviors to not get bound in after render.
In the code below the markup will render correctly, however there will not be any click event bound to the link. If the `wicket:message` tag is removed from the div everything will work correctly. Additionally if the a `wicket:id` is added to the div, and the div is treated as a component, then everything will also work.
Example code
Source:
public class TestPage extends WebPage { public TestPage(PageParameters p) { super(p); queue(new AjaxLink("link") { @Override public void onClick(AjaxRequestTarget target) { target.appendJavaScript("alert('click');"); } }); } }
Markup:
<!DOCTYPE html> <html> <head> <wicket:header-items/> </head> <body > <div wicket:message="label:mainNav"> <a wicket:id="link">Click Me</a> </div> </body> </html>