You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by miguel <mi...@thedeanda.com> on 2013/10/01 19:19:32 UTC

Re: how to connect elements - label and input (checkbox)

I found this searching for the same answer and my existing code was:

<input type="checkbox" wicket:id="acceptTerms"/>
<label wicket:for="acceptTerms">I agree to the terms</label>

but the output is:

<input type="checkbox" name="acceptTerms" id="acceptTerms5"/>
<label for="acceptTerms5">I agree to the terms</label>

but sometimes it seems that the id isn't set on the checkbox. I'm still
trying to figure out why. (using 6.10 still)



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-connect-elements-label-and-input-checkbox-tp4650304p4661648.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how to connect elements - label and input (checkbox)

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Please attach a quickstart that reproduce this in a ticket in JIRA.
Thanks!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 1, 2014 at 6:49 AM, miguel <mi...@thedeanda.com> wrote:

> wow this is the strangest thing. i searched for the same thing a year later
> (to the day almost) and again its a silly "agree to terms" checkbox and
> guess what... wicket 6.17.0 seems to have the same problem...
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-connect-elements-label-and-input-checkbox-tp4650304p4667770.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: how to connect elements - label and input (checkbox)

Posted by miguel <mi...@thedeanda.com>.
wow this is the strangest thing. i searched for the same thing a year later
(to the day almost) and again its a silly "agree to terms" checkbox and
guess what... wicket 6.17.0 seems to have the same problem...

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-connect-elements-label-and-input-checkbox-tp4650304p4667770.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how to connect elements - label and input (checkbox)

Posted by miguel <mi...@thedeanda.com>.
aha! it seems that the first time it renders it doesn't include the id in the
checkbox. when it fails validation, the id appears and the label works as
expected. i'll dig into the code when i get a chance.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-connect-elements-label-and-input-checkbox-tp4650304p4661649.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org