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

Hudson commented on WICKET-2853:
--------------------------------

Integrated in Apache Wicket 1.5.x #54 (See 
[http://hudson.zones.apache.org/hudson/job/Apache%20Wicket%201.5.x/54/])
    

> ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled 
> items
> -----------------------------------------------------------------------------------
>
>                 Key: WICKET-2853
>                 URL: https://issues.apache.org/jira/browse/WICKET-2853
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.8
>            Reporter: Carl-Eric Menzel
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.4.9, 1.5-M1
>
>         Attachments: 
> 0001-retainDisabledSelected-for-listmultiplechoice.patch, 
> WICKET-2528_quickstart_demo.zip
>
>
> Suppose in a shop application the user gets to choose from a number of 
> options for the product, presented by checkboxes. One or more of these 
> options may be mandatory for the given product, so they are not only 
> pre-selected in the model and thus checked on the displayed page, but also 
> disabled via #isDisabled, so they cannot be deselected.
> On form submit the browser (correctly) does not post these disabled values 
> again and ListMultipleChoice#convertChoiceIdsToChoices does not keep these 
> values. Upon re-displaying of the page the checkbox is no longer checked, and 
> the user can't even check it again, since it is disabled. The behavior is 
> demonstrated in the test case contained in the attached patch.
> I propose the attached path to give ListMultipleChoice a new flag called 
> retainDisabledSelected. Default in the patch is currently false, though I 
> think it could also be set to true. If the flag is true, the patched 
> convertChoiceIdsToChoices will go through the old model collection to check 
> if any of the selected values were disabled. Any such values will be added to 
> the new model collection. If the flag is false, the ListMultipleChoice will 
> behave like before. The included testcase verifies the behavior for both flag 
> settings.

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

Reply via email to