Hi,
in Wicket 6.18 this code works as expected ("for" attribute of <label>
is set to id of <input> and id of input is written to HTML):
<label wicket:for="cb">Label</label> <input type="checkbox"
wicket:id="cb"/>
However if reversed, the id of the <input> is not written to the HTML
and therefore the <label> does not work properly:
<input type="checkbox" wicket:id="cb"/> <label wicket:for="cb">Label</label>
My guess is that the AutoLabelResolver calls the getMarkupId method of
the referenced FormComponent too late. A workaround is to call
setOutputMarkupId explictily on the FormComponent.
I can create a JIRA issue and quickstart (should be easily reproducible)
if needed.
Thanks!
Best Regards,
Andreas