ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-386

Some EE Accessible Components throw JavaScript errors when used with JavaScript enabled

    Details

    • Assignee Priority:
      P2

      Description

      The samples all look good with the exception of the ee-accessible-showcase. I tested in IE9 / Firefox11 / Chrome17.

      inputText:
      Typing in the fields or tabbing through them causes a JS error in IE9 and Firefox:
      IE9:
      Message: Exception thrown and not caught
      Line: 1
      Char: 16245
      Code: 0
      URI: http://localhost:8080/ee-accessible-showcase/javax.faces.resource/compat.js.jsf

      Firefox:
      Error: uncaught exception: Cannot find enclosing form.

      panelCollapsible:
      Clicking on the panel headers to collapse or expand them causes a JS error in IE9:
      Message: Invalid procedure call or argument
      Line: 1
      Char: 1
      Code: 0
      URI: http://localhost:8080/ee-accessible-showcase/component/panelCollapsible.jsf

      Some of the links in the panel are broken (ICEfaces SVN, ICEfaces Projects).

      panelTab:
      Switching tabs causes a JS error in IE9:
      Message: Invalid procedure call or argument
      Line: 1
      Char: 1
      Code: 0
      URI: http://localhost:8080/ee-accessible-showcase/component/panelTab.jsf

      Besides this there are no errors.

        Activity

        Hide
        Ken Fyten added a comment -

        Resolved issues with panelCollapsible and panelTab by removing extraneous JavaScript in the renderers.

        There doesn't seem to be any inputText source in the accessible package, so will try removing that tag altogether.

        Show
        Ken Fyten added a comment - Resolved issues with panelCollapsible and panelTab by removing extraneous JavaScript in the renderers. There doesn't seem to be any inputText source in the accessible package, so will try removing that tag altogether.
        Hide
        yip.ng added a comment - - edited

        input text, input text area and input secret removed.

        For why they had been kept, see last point of http://jira.icesoft.org/browse/IPCK-351?focusedCommentId=38625&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_38625 and point 3 of http://jira.icesoft.org/browse/IPCK-351?focusedCommentId=38668&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_38668

        Modified: C:\svn\repo\icefaces-ee3\trunk\icefaces-ee\ee-comps\ee-accessible\component-metadata\src\main\resources\conf\extended-faces-config.xml
        Modified: C:\svn\repo\icefaces-ee3\trunk\icefaces-ee\ee-comps\ee-accessible\component-metadata\src\main\resources\conf\faces-config-base.xml
        Completed: At revision: 30946

        Show
        yip.ng added a comment - - edited input text, input text area and input secret removed. For why they had been kept, see last point of http://jira.icesoft.org/browse/IPCK-351?focusedCommentId=38625&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_38625 and point 3 of http://jira.icesoft.org/browse/IPCK-351?focusedCommentId=38668&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_38668 Modified: C:\svn\repo\icefaces-ee3\trunk\icefaces-ee\ee-comps\ee-accessible\component-metadata\src\main\resources\conf\extended-faces-config.xml Modified: C:\svn\repo\icefaces-ee3\trunk\icefaces-ee\ee-comps\ee-accessible\component-metadata\src\main\resources\conf\faces-config-base.xml Completed: At revision: 30946
        Hide
        Cruz Miraback added a comment -

        The same JS errors for panelCollapsible and panelTab are still occurring in IE9 using EE3.0 Build 10.

        Show
        Cruz Miraback added a comment - The same JS errors for panelCollapsible and panelTab are still occurring in IE9 using EE3.0 Build 10.
        Hide
        yip.ng added a comment - - edited

        The collapsible or tab header is just a simple submit-type input element. There is already no onclick attribute attached to it. But the bridge seems to have registered a capture submit listener, and the error is from the bridge listener. See screenshot-1.png.

        Show
        yip.ng added a comment - - edited The collapsible or tab header is just a simple submit-type input element. There is already no onclick attribute attached to it. But the bridge seems to have registered a capture submit listener, and the error is from the bridge listener. See screenshot-1.png.
        Hide
        Mircea Toma added a comment -

        When onsubmit event is captured our bridge tries to verify if the submitting element still exists after the update. If the element misses the 'id' attribute it will try to lookup the element by it's name as a fallback mechanism (since for input elements the name and id will match) and if nothing's returned the id is set to match the name attribute. In IE9 the browser will return the element even when the its ID attribute is missing. This confuses the fallback mechanism which will fail when further on tries to lookup the element by its ID.

        Show
        Mircea Toma added a comment - When onsubmit event is captured our bridge tries to verify if the submitting element still exists after the update. If the element misses the 'id' attribute it will try to lookup the element by it's name as a fallback mechanism (since for input elements the name and id will match) and if nothing's returned the id is set to match the name attribute. In IE9 the browser will return the element even when the its ID attribute is missing. This confuses the fallback mechanism which will fail when further on tries to lookup the element by its ID.
        Hide
        Mircea Toma added a comment -

        Add second check for IE9 which will verify if the looked up element has the 'id' attribute.

        Show
        Mircea Toma added a comment - Add second check for IE9 which will verify if the looked up element has the 'id' attribute.
        Hide
        Mircea Toma added a comment -

        Applied fix to maintenance branch.

        Show
        Mircea Toma added a comment - Applied fix to maintenance branch.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: