You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Joonas Koivunen (JIRA)" <ji...@apache.org> on 2010/10/22 18:20:15 UTC

[jira] Created: (WICKET-3129) CheckBoxMultipleChoice should be more expandable

CheckBoxMultipleChoice should be more expandable
------------------------------------------------

                 Key: WICKET-3129
                 URL: https://issues.apache.org/jira/browse/WICKET-3129
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.5-M2.1, 1.4.12
            Reporter: Joonas Koivunen


Looking at the source code of this component the only way to provide custom Label's per generated <input type="checkbox"/> seems to be to have them as siblings of this component AND have a IChoiceRenderer that will return *null* display values.

A non-breaking change would be that the CheckBoxMultipleChoice#onComponentTagBody would NOT replace it's body IFF it has children and all returned display values were null's.

That would allow user to add for example RefreshingView<T> to produce <input /><label /> for the component, if the user wants to use other <label> or input compents.

Another solution could be adding a boolean property to control whether user is expected to provide the labels manually, onComponentTag or onComponentTagBody would then assert that the component has children.

I can provide a patch if either solution sounds reasonable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3129) CheckBoxMultipleChoice should be more expandable

Posted by "Joonas Koivunen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923915#action_12923915 ] 

Joonas Koivunen commented on WICKET-3129:
-----------------------------------------

Actually it'd seem that I misread the sources of CheckBoxMultipleChoice#onComponentTagBody; returning null display values "trick" works only if the value is not of type java.lang.String, or something like that.

Perhaps just refactoring methods appendCheckbox and appendLabel would work?

> CheckBoxMultipleChoice should be more expandable
> ------------------------------------------------
>
>                 Key: WICKET-3129
>                 URL: https://issues.apache.org/jira/browse/WICKET-3129
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.12, 1.5-M2.1
>            Reporter: Joonas Koivunen
>
> Looking at the source code of this component the only way to provide custom Label's per generated <input type="checkbox"/> seems to be to have them as siblings of this component AND have a IChoiceRenderer that will return *null* display values.
> A non-breaking change would be that the CheckBoxMultipleChoice#onComponentTagBody would NOT replace it's body IFF it has children and all returned display values were null's.
> That would allow user to add for example RefreshingView<T> to produce <input /><label /> for the component, if the user wants to use other <label> or input compents.
> Another solution could be adding a boolean property to control whether user is expected to provide the labels manually, onComponentTag or onComponentTagBody would then assert that the component has children.
> I can provide a patch if either solution sounds reasonable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.