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

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Attachment Firebug_console_2.0.jpg [ 13178 ]
        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.
        Tyler Johnson made changes -
        Attachment sc10064.war [ 13179 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.0.2 [ 10273 ]
        Fix Version/s EE-2.0.0.GA_P01 [ 10271 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.1 [ 10241 ]
        Fix Version/s 2.0.2 [ 10273 ]
        Affects Version/s 2.0.1 [ 10255 ]
        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?
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P1
        Assignee yip.ng [ yip.ng ]
        yip.ng made changes -
        Attachment screenshot-02.png [ 13271 ]
        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?
        yip.ng made changes -
        Attachment screenshot-03.png [ 13272 ]
        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?
        Tyler Johnson made changes -
        Salesforce Case [5007000000GtwPh]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24823 Mon Jun 13 13:05:07 MDT 2011 yip.ng ICE-6835: 2.0 compat selectInputText will not work when nested comps have JS events.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24824 Mon Jun 13 13:07:19 MDT 2011 yip.ng ICE-6835: 2.0 compat selectInputText will not work when nested comps have JS events.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java
        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
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta [ 10291 ]
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: