Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
1.4.18, 1.5-RC6
-
None
-
None
Description
AutoLabelResolver is very useful for us, but I've discovered two related problems.
Nesting a wicket:message doesn't work.
<label wicket:for="..."><wicket:message key="foo">bar</wicket:message></label>
In this case I get a MarkupException, claiming that it's missing the closing tag for <label>, even though it's there. This is fixed by removing the guard that checks for RawMarkup at AutoLabel#onComponentTag. It does not seem to be breaking anything else. The cast to RawMarkup further down was a complete no-op, so it could be safely removed.
Also, nesting an input component in its label does not work either:
<label wicket:for="myComp"><input type="text" wicket:id="myComp"/></label>
Here it complains about being unable to find the input component. This is fixed by making AutoLabelResolver transparent in 1.4, and by making AutoLabel into a TransparentWebMarkupContainer in 1.5.
Patches are ready.
Attachments
Attachments
Issue Links
- is part of
-
WICKET-3903 Split AutoLabelResolver into wicket:for and wicket:label
- Resolved