ICEfaces
  1. ICEfaces
  2. ICE-7254

ace:tooltip throws JS error when nested markup is not in a single line

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any
    • Assignee Priority:
      P1
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      The workaround is to make sure that the nested children appear all in a single line, from the end of the opening ace:tooltip tag to the beginning of the closing tag. Likewise, any included resources via ui:include must follow this rule, from the end of the opening ui:composition tag to the beginning of the closing tag. For example:

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ace="http://www.icefaces.org/icefaces/components"><div><h:outputText value="tooltip text" /></div></ui:composition>
      Show
      The workaround is to make sure that the nested children appear all in a single line, from the end of the opening ace:tooltip tag to the beginning of the closing tag. Likewise, any included resources via ui:include must follow this rule, from the end of the opening ui:composition tag to the beginning of the closing tag. For example: <ui:composition xmlns=" http://www.w3.org/1999/xhtml " xmlns:ui=" http://java.sun.com/jsf/facelets " xmlns:h=" http://java.sun.com/jsf/html " xmlns:ace=" http://www.icefaces.org/icefaces/components "><div><h:outputText value="tooltip text" /></div></ui:composition>

      Description

      When loading a page that contains an ace:tooltip component and such component doesn't specify a 'value' attribute but has nested children to display, a Javascript error is thrown in the browser console, reporting an unterminated string. The problem is that this component is initialized via a jQuery call, which must contain the content to be displayed inside a string argument. If the nested markup contains any spaces or new lines, the string is considered unterminated and the code is invalid.

        Activity

        Arturo Zambrano created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Assignee Priority P3
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Adnan Durrani [ adnan.durrani ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-7220 [ ICE-7220 ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P3 P1
        Assignee Adnan Durrani [ adnan.durrani ] Arturo Zambrano [ artzambrano ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P1 P2
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2 P1
        Ken Fyten made changes -
        Salesforce Case []
        Affects Version/s 2.1-Beta [ 10291 ]
        Affects Version/s 2.1 [ 10241 ]
        Hide
        Arturo Zambrano added a comment -

        Fixed at revision 25921. Done by rendering contents in a separate hidden div and then passing a reference to its innerHTML when initializing the widget.

        Show
        Arturo Zambrano added a comment - Fixed at revision 25921. Done by rendering contents in a separate hidden div and then passing a reference to its innerHTML when initializing the widget.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta2 [ 10294 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: