Re: wicket:for behavior
Hi, Try with : textField.setOutputMarkupId(true). If this helps please file a ticket - 'wicket:for' should do this for you. On Thu, Mar 14, 2013 at 5:01 AM, Maxim Solodovnik solomax...@gmail.comwrote: Hello, I'm trying to use wicket:for as follows: input wicket:id=rememberMe type=checkbox /label wicket:for=rememberMewicket:ommessage key=288 //label https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/auth/SignInPage.html the resulting HTML is: tdinput type=checkbox name=rememberMelabel for=id3Remember login/label/td 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 -- WBR Maxim aka solomax -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: wicket:for behavior
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. The solution is quite simple: wrap the input in the label: label wicket:for=id3 input wicket:id=id3 ... wicket:message .../ /label 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=rememberMewicket:ommessage key=288 //label https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/auth/SignInPage.html the resulting HTML is: tdinput type=checkbox name=rememberMelabel for=id3Remember login/label/td 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
Re: wicket:for behavior
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.htmlhttps://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/auth/SignInPage.html the resulting HTML is: tdinput type=checkbox name=rememberMelabel for=id3Remember login/label/td http://demo.dataved.ru/**openmeetings/htmlhttp://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/
Re: wicket:for behavior
Thanks a lot! *.setOutputMarkupId(**true)* helps! On Thu, Mar 14, 2013 at 3:47 PM, Martin Grigorov mgrigo...@apache.orgwrote: 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: tdinput type=checkbox name=rememberMelabel for=id3Remember 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/ -- WBR Maxim aka solomax
Re: wicket:for behavior
wicket:for cant set output markup id because it comes after the form component in markup and so the form component has already been rendered. it already sets the output of markup, but it only helps if the label is before the component in markup. -igor On Thu, Mar 14, 2013 at 1:35 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Try with : textField.setOutputMarkupId(true). If this helps please file a ticket - 'wicket:for' should do this for you. On Thu, Mar 14, 2013 at 5:01 AM, Maxim Solodovnik solomax...@gmail.comwrote: Hello, I'm trying to use wicket:for as follows: input wicket:id=rememberMe type=checkbox /label wicket:for=rememberMewicket:ommessage key=288 //label https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/auth/SignInPage.html the resulting HTML is: tdinput type=checkbox name=rememberMelabel for=id3Remember login/label/td 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 -- WBR Maxim aka solomax -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org