ICEfaces
  1. ICEfaces
  2. ICE-7714

h:selectOneMenu update not applied from ValueChangeListener

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.RC1
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Tomcat 7.0.12
      ICEfaces 3RC1a

      Description

      The valueChangeListener in an h:selectOneMenu is being used to cross validate with another field in one of my applications. If another field is a certain value, the h:selectOneMenu value should be set to '0', even if '0' was the initial value before the change.

      When an attempt is made to set back to '0' the following response comes back in the console:

      <?xml version='1.0' encoding='UTF-8'?>
      <partial-response><changes><update id="javax.faces.ViewState"><![CDATA[574103076592712092:7902382816915448980]]></update><eval><![CDATA[alert('Invalid Cycle');]]></eval><extension aceCallbackParam="validationFailed">{"validationFailed":false}</extension></changes></partial-response>

      When the value is not set to '0', the component updates as expected.

      Attached is a war file and source code for a test case.

        Activity

        Hide
        Arran Mccullough added a comment -

        Can see the issue with the following code:

        <h:selectOneMenu id="testMenu"
        value="#

        {testBean.menuValue}

        ">
        <f:selectItem itemValue="1" itemLabel="One & One"/>
        <f:selectItem itemValue="2" itemLabel="Two and Two"/>
        </h:selectOneMenu>

        Show
        Arran Mccullough added a comment - Can see the issue with the following code: <h:selectOneMenu id="testMenu" value="# {testBean.menuValue} "> <f:selectItem itemValue="1" itemLabel="One & One"/> <f:selectItem itemValue="2" itemLabel="Two and Two"/> </h:selectOneMenu>
        Hide
        Ted Goddard added a comment -

        Since the DOM parser version changes the order of value="" and selected="", it is essentially guaranteed to modify the TextNode for any interaction with the component, thereby forcing an update of that component.

        Show
        Ted Goddard added a comment - Since the DOM parser version changes the order of value="" and selected="", it is essentially guaranteed to modify the TextNode for any interaction with the component, thereby forcing an update of that component.
        Hide
        Ted Goddard added a comment -

        Modified Test2.zip to include ampersand markup as well as changed the test logic to accept a selection of "3" (this allows the testing of changed input values that should not result in a page update).

        Show
        Ted Goddard added a comment - Modified Test2.zip to include ampersand markup as well as changed the test logic to accept a selection of "3" (this allows the testing of changed input values that should not result in a page update).
        Hide
        Ted Goddard added a comment -

        Regex implementation checked in but not verified with multiple select cases. The previous intermediate-DOM based version could not be repaired due to the output differences between the original component and the intermediate DOM output.

        Show
        Ted Goddard added a comment - Regex implementation checked in but not verified with multiple select cases. The previous intermediate-DOM based version could not be repaired due to the output differences between the original component and the intermediate DOM output.
        Hide
        Ted Goddard added a comment -

        The encodeEnd() method of MenuRenderer which makes use of FastStringWriter to embed the text node in the DOM does allow for a "multiple" select option.

        Show
        Ted Goddard added a comment - The encodeEnd() method of MenuRenderer which makes use of FastStringWriter to embed the text node in the DOM does allow for a "multiple" select option.

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: