AutoLabelResolver breaks when the label contains wicket:message or a nested component -------------------------------------------------------------------------------------
Key: WICKET-3894 URL: https://issues.apache.org/jira/browse/WICKET-3894 Project: Wicket Issue Type: Bug Components: wicket-core Affects Versions: 1.4.18, 1.5-RC6 Reporter: Carl-Eric Menzel Attachments: 1.4-0001-make-autolabelresolver-compatible-with-nested-compon.patch, 1.5-0001-make-autolabelresolver-compatible-with-nested-compon.patch 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. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira