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 2010/04/29 09:05:53 UTC

[jira] Created: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

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


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.


[jira] Resolved: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2853.
-----------------------------------

    Fix Version/s: 1.4.9
                   1.5-M1
       Resolution: Fixed

> 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.


[jira] Updated: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Carl-Eric Menzel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl-Eric Menzel updated WICKET-2853:
-------------------------------------

    Attachment:     (was: 0001-retainDisabledSelected-for-listmultiplechoice.patch)

> 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
>         Attachments: 0001-retainDisabledSelected-for-listmultiplechoice.patch
>
>
> 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.


[jira] Updated: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson updated WICKET-2853:
-------------------------------------

    Priority: Minor  (was: Major)

> 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
>            Priority: Minor
>         Attachments: 0001-retainDisabledSelected-for-listmultiplechoice.patch
>
>
> 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.


[jira] Updated: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Brad Fritz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brad Fritz updated WICKET-2853:
-------------------------------

    Attachment: WICKET-2528_quickstart_demo.zip

Quickstart app to demonstrate WICKET-2528 problem where
checked+disabled checkboxes created with CheckBoxMultipleChoice become
unselected on form submit.

If FormTester.submit() behaved more like real browser and did not
submit values for disabled fields, unit test would fail.  Problem can
still be observed manually by running "mvn jetty:run", submitting form
as-is, and noting that the "bar" checkbox is unchecked by the submit.
(Tested with Firefox 3.6.3.)


> 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
>            Priority: Minor
>         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.


[jira] Updated: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Carl-Eric Menzel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl-Eric Menzel updated WICKET-2853:
-------------------------------------

    Attachment: 0001-retainDisabledSelected-for-listmultiplechoice.patch

> 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
>         Attachments: 0001-retainDisabledSelected-for-listmultiplechoice.patch
>
>
> 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.


[jira] Commented: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Carl-Eric Menzel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863818#action_12863818 ] 

Carl-Eric Menzel commented on WICKET-2853:
------------------------------------------

Hi Brad, thank you for this quickstart. It demonstrates exactly what I described.

Jeremy, if you look at this you will see that after the submit the middle of the three checkboxes on the quickstart page will no longer be checked. In my opinion it should still be checked (or at least that behavior should be available, such as in my patch with the retaindDisabledSelected flag).

In my patch there is a new testcase "DisabledItemRetainingCheckBoxTest" that tests for this behavior. I didn't find a problem with FormTester, however - I just simulate what the browser would be doing: Just sending one of the checkboxes, even if two are checked and the second one is disabled. That's the normal behavior as specified in the HTML standard. My testcase tests both the "old" behavior with the flag off and the "new" behavior with the flag on.

> 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
>            Priority: Minor
>         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.


[jira] Assigned: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-2853:
-------------------------------------

    Assignee: Igor Vaynberg

> 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
>         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.


[jira] Commented: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863528#action_12863528 ] 

Jeremy Thomerson commented on WICKET-2853:
------------------------------------------

can you create a simple quickstart that demonstrates this usecase?

> 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
>         Attachments: 0001-retainDisabledSelected-for-listmultiplechoice.patch
>
>
> 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.


[jira] Commented: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Brad Fritz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863808#action_12863808 ] 

Brad Fritz commented on WICKET-2853:
------------------------------------

D'oh!  The WICKET-2528 references in my example should obviously be WICKET-2853.

> 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
>            Priority: Minor
>         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.


[jira] Updated: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Carl-Eric Menzel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl-Eric Menzel updated WICKET-2853:
-------------------------------------

    Attachment: 0001-retainDisabledSelected-for-listmultiplechoice.patch

Expanded the scope of the patch a bit to also cover the case if the user does not select anything. #convertChoicesToIds wouldn't be called then, so now #convertValue() is also patched.

> 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
>         Attachments: 0001-retainDisabledSelected-for-listmultiplechoice.patch
>
>
> 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.


[jira] Commented: (WICKET-2853) ListMultipleChoice/CheckBoxMultipleChoice do not retain selected but disabled items

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ 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.