On Thu, Mar 14, 2013 at 9:42 AM, Bas Gooren <b...@iswd.nl> wrote: > We're still on wicket 1.5, so I don't know if this still applies in 6.x, > but the reason for this is that the wicket:for handler is executed in the > same order as your html. > > That means that, since your wicket:for is after the input itself, calling > setOutputMarkupId() on it no longer has any effect during that render. > > You are probably correct.
> The solution is quite simple: wrap the input in the label: > > <label wicket:for="id3"> > <input wicket:id="id3" ...> > <wicket:message .../> > </label> > With such markup there is no need of wicket:for at all. > > In this scenario the wicket:for is always handled before the input. > > Met vriendelijke groet, > Kind regards, > > Bas Gooren > > Op 14-3-2013 5:01, schreef Maxim Solodovnik: > > Hello, >> >> I'm trying to use wicket:for as follows: >> <input wicket:id="rememberMe" type="checkbox" /><label >> wicket:for="rememberMe"><**wicket:ommessage key="288" /></label> >> https://svn.apache.org/repos/**asf/openmeetings/trunk/** >> singlewebapp/src/org/apache/**openmeetings/web/pages/auth/** >> SignInPage.html<https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/auth/SignInPage.html> >> >> the resulting HTML is: >> <td><input type="checkbox" name="rememberMe"><label for="id3">Remember >> login</label></td> >> http://demo.dataved.ru/**openmeetings/html<http://demo.dataved.ru/openmeetings/html> >> >> and label for is not working :( >> >> Am I using this feature improperly? >> Wicket 6.6.0 is used >> >> Thanks in advance >> >> > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>