Details
Description
AutoLabelResolver is combining two different things - managing the "for" attribute in <label>, and managing FormComponent#getLabel.
After an IRC conversation with martin-g and ivaynberg, I propose splitting this behavior into two parts, as done in the upcoming patch. Use wicket:for as before, use <wicket:label> to output or pick up the label string. See AutoFormComponentLabelResolver for details.
AutoLabelResolver also did not play nice with Enclosure - it would confuse Enclosure and make it throw ArrayIndexOutOfBoundExceptions. That could be cured by having AutoLabelTagResolver do setAutoComponentTag=true, but that again would break AutoLabelResolver's <span> magic. By splitting it up like this, that issue is avoided, and wicket:for, wicket:label and Enclosure play nicely together.
Attachments
Attachments
Issue Links
- incorporates
-
WICKET-3894 AutoLabelResolver breaks when the label contains wicket:message or a nested component
- Resolved