You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (Resolved) (JIRA)" <ji...@apache.org> on 2011/11/20 18:13:52 UTC

[jira] [Resolved] (WICKET-3718) Introduce select-all components for all types of checkbox

     [ https://issues.apache.org/jira/browse/WICKET-3718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-3718.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.0
         Assignee: Martin Grigorov
    
> Introduce select-all components for all types of checkbox
> ---------------------------------------------------------
>
>                 Key: WICKET-3718
>                 URL: https://issues.apache.org/jira/browse/WICKET-3718
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.18, 1.5-RC5
>            Reporter: Carl-Eric Menzel
>            Assignee: Martin Grigorov
>             Fix For: 1.5.0
>
>         Attachments: 0001-Introduce-a-comprehensive-set-of-select-all-componen.patch, checkselector-quickstart.tar.gz
>
>
> So far, Wicket only has CheckGroupSelector as a select-all component. It has two main drawbacks:
> - it only works with CheckGroup components, not with CheckboxMultipleChoice or multiple CheckBox components.
> - it has no "auto update" feature that updates the state of the select-all when any of the associated checkboxes is checked or unchecked.
> This patch introduces two new components:
> - CheckboxMultipleChoiceSelector: This does for CheckboxMultipleChoice what CheckGroupSelector does for CheckGroup.
> - CheckBoxSelector: A select-all component for a collection of CheckBox instances.
> Both are based on a new abstract superclass called AbstractCheckSelector that does the heavy lifting. The subclasses only provide a JS function that finds the associated checkboxes. The superclass manages both the select-all and the auto-update mentioned above. The auto update feature is turned on by default, since it seems to be the most sensible behavior.
> The patch also pretty much rewrites the original CheckGroupSelector to also use the new AbstractCheckSelector. In CheckGroupSelector the auto-update feature is disabled by default to keep the behavior the same as in previous versions. It can be enabled by overriding wantAutomaticUpdate() to return true. This default should probably be changed in Wicket 1.5 or 1.6.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira