You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Carl-Eric Menzel (JIRA)" <ji...@apache.org> on 2011/07/13 15:57:01 UTC

[jira] [Issue Comment Edited] (WICKET-3894) AutoLabelResolver breaks when the label contains wicket:message or a nested component

    [ https://issues.apache.org/jira/browse/WICKET-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064545#comment-13064545 ] 

Carl-Eric Menzel edited comment on WICKET-3894 at 7/13/11 1:56 PM:
-------------------------------------------------------------------

These patches will fix the issues as described above, for 1.4 and 1.5. They also contain the appropriate testcases.

      was (Author: cmenzel):
    These patches will fix the issues as described above, for 1.4 and 1.5.
  
> 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