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

        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>
        Hide
        Adnan Durrani added a comment -

        revision 15298

        Show
        Adnan Durrani added a comment - revision 15298
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: