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

        There are no subversion log entries for this issue yet.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: