ICEfaces
  1. ICEfaces
  2. ICE-2440

SelectManyCheckBox - Required attribute does not work with Partial submit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2, 1.7DR#2
    • Fix Version/s: 1.7DR#3, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Tomcat5

      Description

      For SelectManyCheckBox with attributes required=true & partialSubmit=true, no validation error is thrown when nothing is selected and a partial submit is triggered.
      Note: validation works fine with full page submit.

        Activity

        Mandeep Hayher created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Priority P1
        Assignee Adnan Durrani [ adnan.durrani ]
        Ken Fyten made changes -
        Summary SelectManyCheckBox - Required attribute doesnot work with Partial submit SelectManyCheckBox - Required attribute does not work with Partial submit
        Adnan Durrani made changes -
        Affects Version/s 1.7DR#2 [ 10110 ]
        Affects Version/s 1.6.2 [ 10111 ]
        Affects Version/s 1.7DR#3 [ 10112 ]
        Hide
        Adnan Durrani added a comment -

        This is a special case, and its related to the how the ids of the selectManyCheckbox component is being rendered.

        ICEfaces tries to set the "required" attribute to "false" on all components except the one who caused the partialSubmit, and the framework identify about that component by the 'ice.event.captured' request parameter. However when you click on a checkbox it doesn't send the id of the "component" instead it sends the id of the "chcekbox". That is why algorithm does not find the selectManyCheckbox component and that is why its required attribute gets set to false as well.

        (e.g.)
        <selectManyCheckbox id="mycomponent">
        <item a>
        <item b>
        <selectManyCheckbox>

        Rendered HTML:
        <table id="mycomponent">
        <tr><td><input id="mycomponent:_0"</td></tr> (clicking on the first checkbox wil send the "mycomponent:_0", however server will be expecting "mycomponent")
        <tr><td><input id="mycomponent:_1"</td></tr>
        </table>

        Show
        Adnan Durrani added a comment - This is a special case, and its related to the how the ids of the selectManyCheckbox component is being rendered. ICEfaces tries to set the "required" attribute to "false" on all components except the one who caused the partialSubmit, and the framework identify about that component by the 'ice.event.captured' request parameter. However when you click on a checkbox it doesn't send the id of the "component" instead it sends the id of the "chcekbox". That is why algorithm does not find the selectManyCheckbox component and that is why its required attribute gets set to false as well. (e.g.) <selectManyCheckbox id="mycomponent"> <item a> <item b> <selectManyCheckbox> Rendered HTML: <table id="mycomponent"> <tr><td><input id="mycomponent:_0"</td></tr> (clicking on the first checkbox wil send the "mycomponent:_0", however server will be expecting "mycomponent") <tr><td><input id="mycomponent:_1"</td></tr> </table>
        Adnan Durrani made changes -
        Assignee Adnan Durrani [ adnan.durrani ] Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        Assignee Mircea Toma [ mircea.toma ] Adnan Durrani [ adnan.durrani ]
        Adnan Durrani made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15298 Tue Dec 04 16:04:52 MST 2007 adnan.durrani Fix for ICE-2440 (SelectManyCheckBox - Required attribute does not work with Partial submit)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/RadioRenderer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/SelectManyCheckboxListRenderer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/HTML.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/xp/xp-portlet.css
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/xp/xp.css
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/royale/royale.css
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/SelectManyCheckboxListRenderer.java
        Hide
        Adnan Durrani added a comment -

        revision 15298

        Show
        Adnan Durrani added a comment - revision 15298
        Adnan Durrani made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 1.7DR#3 [ 10112 ]
        Resolution Fixed [ 1 ]
        Hide
        Adnan Durrani added a comment -

        Micea's suggested fix has been applied. Both the ice:selectOneRadio and the ice:selectManyCheckbox components are rendering the "fieldset" element.

        Show
        Adnan Durrani added a comment - Micea's suggested fix has been applied. Both the ice:selectOneRadio and the ice:selectManyCheckbox components are rendering the "fieldset" element.
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Assignee Adnan Durrani [ adnan.durrani ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Mandeep Hayher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: