[
https://issues.apache.org/jira/browse/WICKET-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carl-Eric Menzel updated WICKET-3478:
-------------------------------------
Attachment: trunk-WICKET-3478-allow-dynamic-prefix-suffix-for-Checkbox.patch
1.4.x-WICKET-3478-allow-dynamic-prefix-suffix-for-Checkbox.patch
One patch each for 1.4.x and trunk(1.5) doing exactly this. New methods
getPrefix(int index, T choice) and getSuffix(int index, T choice) can be
overriden. By default they just call the old getPrefix()/getSuffix() methods,
so default behavior is unchanged.
> Allow for dynamic prefix and suffixes in CheckBoxMultipleChoice
> ---------------------------------------------------------------
>
> Key: WICKET-3478
> URL: https://issues.apache.org/jira/browse/WICKET-3478
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-core
> Affects Versions: 1.4.16
> Environment: All
> Reporter: Rahul Pilani
> Attachments:
> 1.4.x-WICKET-3478-allow-dynamic-prefix-suffix-for-Checkbox.patch,
> trunk-WICKET-3478-allow-dynamic-prefix-suffix-for-Checkbox.patch
>
>
> Currently, CheckBoxMultipleChoice has support for a prefix and a suffix to be
> defined for each choice being rendered. However, there is no way to change
> them based on the item being rendered. A possible use case is in case some
> data needs to be used in either the suffix or prefix for Ajax or other
> javascript related use.
> Please consider adding
> getPrefix(int index, T choice), and getSuffix(int index, T choice) methods to
> this component and using them instead of getPrefix() and getSuffix() within
> the onComponentTagBody method.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira