You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2020/10/19 19:06:00 UTC

[jira] [Commented] (WICKET-6843) Using WicketMessageTagHandler on non-components prevents Ajax behaviors

    [ https://issues.apache.org/jira/browse/WICKET-6843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17217032#comment-17217032 ] 

Martin Tzvetanov Grigorov commented on WICKET-6843:
---------------------------------------------------

Please attach a quickstart/demo application that uses a newer version of Wicket, like 8.10.0 or 9.1.0.

Thank you!

> Using WicketMessageTagHandler on non-components prevents Ajax behaviors
> -----------------------------------------------------------------------
>
>                 Key: WICKET-6843
>                 URL: https://issues.apache.org/jira/browse/WICKET-6843
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 8.0.0
>            Reporter: Peter Franza
>            Priority: Major
>
> 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:
> {code:java}
> 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');");
> 			}
> 		});
> 	}
> }
> {code}
> Markup:
> {code:java}
> <!DOCTYPE html>
> <html>
> <head>
>  <wicket:header-items/>
> </head>
> <body >
> 	<div wicket:message="label:mainNav">
> 		<a wicket:id="link">Click Me</a>
> 	</div>
> </body>
> </html>
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)