ICEfaces
  1. ICEfaces
  2. ICE-6835

2.0 compat selectInputText will not work when nested comps have JS events

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, EE-2.0.0.GA
    • Fix Version/s: 2.1-Beta, 3.0, EE-2.0.0.GA_P01
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      -
    • Assignee Priority:
      P1

      Description

      If you add a javascript event to a nested component (ex. outputText), the selectInputText will not render it´s drop down list and the attached malformed XML exception will be thrown. Here is an example:

      <ice:selectInputText>
      <f:facet name="selectInputText">
      <ice:panelGrid columns="1">
      <ice:outputText onclick="alert('test');" id="AutoCmpSt" value="#{city.state}" />
      </ice:panelGrid>
      </f:facet>
      </ice:selectInputText>

      This is not an issue in 1.8.2 P02.

        Activity

        Hide
        Tyler Johnson added a comment -

        Test case attached. Intended for deployment on Tomcat 6.

        Show
        Tyler Johnson added a comment - Test case attached. Intended for deployment on Tomcat 6.
        Hide
        Maxim Zaritsky added a comment -

        Do we have any estimate on fixing this Bug?

        Show
        Maxim Zaritsky added a comment - Do we have any estimate on fixing this Bug?
        Hide
        yip.ng added a comment - - edited

        Tried displaying the response body in the browser and there was no error. See screenshot 2. So the malformed XML error must be caused by something else?

        Show
        yip.ng added a comment - - edited Tried displaying the response body in the browser and there was no error. See screenshot 2. So the malformed XML error must be caused by something else?
        Hide
        yip.ng added a comment - - edited

        onclick attribute is rendered by PassThruAttributeWriter. PassThruAttributeWriter is exactly the same in ICEfaces 1.8 and ICEfaces 2. Yet the single quote in the onclick attribute value is escaped in 1.8 but not in 2. Why?

        Show
        yip.ng added a comment - - edited onclick attribute is rendered by PassThruAttributeWriter. PassThruAttributeWriter is exactly the same in ICEfaces 1.8 and ICEfaces 2. Yet the single quote in the onclick attribute value is escaped in 1.8 but not in 2. Why?
        Hide
        yip.ng added a comment -

        This is caused by changes in ICE-5551. org.icefaces.impl.util.DOMUtils#escapeAttribute was added to replace org.icefaces.impl.util.DOMUtils#escapeAnsi. In escapeAttribute() the single quote character was purposely removed from the list of characters to be escaped. Put it back in? Would it cause problems for other calls (many indirectly) to the function?

        Show
        yip.ng added a comment - This is caused by changes in ICE-5551 . org.icefaces.impl.util.DOMUtils#escapeAttribute was added to replace org.icefaces.impl.util.DOMUtils#escapeAnsi. In escapeAttribute() the single quote character was purposely removed from the list of characters to be escaped. Put it back in? Would it cause problems for other calls (many indirectly) to the function?
        Hide
        yip.ng added a comment -

        Single quote escaping doesn't warrant changing utility methods. Private method created just to escape single quote in SelectInputTextRenderer.

        Revision: 24823


        Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java

        Revision: 24824


        Modified : /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java

        Show
        yip.ng added a comment - Single quote escaping doesn't warrant changing utility methods. Private method created just to escape single quote in SelectInputTextRenderer. Revision: 24823 Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java Revision: 24824 Modified : /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java

          People

          • Assignee:
            yip.ng
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: