ICEfaces
  1. ICEfaces
  2. ICE-7515

MyFaces 2: two copies of jquery.js are downloaded when ace:ajax tag is included

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta2
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: ACE-Components, Framework
    • Labels:
      None
    • Environment:
      ICEfaces 3 ACE MyFaces 2
    • Assignee Priority:
      P1

      Description

      As of revision 26558, there is an issue that causes a problem running ACE Showcase with MyFaces.

      You can build with MyFaces using: ant -Dmyfaces='true' clean servlet-profile

      In that revision the panel used to show the source code was modified to remove a checkbox with f:ajax and replaced with a panel that uses ace:ajax. The problem manifests as a JavaScript error and the example content not rendering properly. For example, the ace:accordion looks like the attached screenshot. Removing the ace:ajax tag from the source code panel makes the issue go away.

      The problem looks like it stems from the fact that the 2 copied of jquery.js are loaded - one before the component's script and one after. Removing the ace:ajax tag stops the extra request for jquery.js. The problem also doesn't happen with Mojarra.

        Issue Links

          Activity

          Hide
          Deryk Sinotte added a comment -

          Attaching screenshot that shows accordion rendering incorrectly and the corresponding JavaScript error.

          Show
          Deryk Sinotte added a comment - Attaching screenshot that shows accordion rendering incorrectly and the corresponding JavaScript error.
          Hide
          Deryk Sinotte added a comment -

          Assigning to Mircea and setting priority to 1.

          Show
          Deryk Sinotte added a comment - Assigning to Mircea and setting priority to 1.
          Hide
          Deryk Sinotte added a comment -

          I updated from 26558 to the latest trunk to ensure the same problem is there. Since the left side menu now uses the accordion to display the menu items, you can see the issue on the initial page load. I don't see an ace:ajax tag on the page but I do see 2 copies of jquery.jsf being downloaded as described before. The second one does not have the hashcode query parameter so the URLs are not exact:

          http://localhost:8080/my/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace&v=1774837284
          http://localhost:8080/my/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace

          Show
          Deryk Sinotte added a comment - I updated from 26558 to the latest trunk to ensure the same problem is there. Since the left side menu now uses the accordion to display the menu items, you can see the issue on the initial page load. I don't see an ace:ajax tag on the page but I do see 2 copies of jquery.jsf being downloaded as described before. The second one does not have the hashcode query parameter so the URLs are not exact: http://localhost:8080/my/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace&v=1774837284 http://localhost:8080/my/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace
          Hide
          Mircea Toma added a comment -

          Changed BridgeSetup to collect the mandatory resource components that need to replace the @ResourceDependency components and then replace them all at once. Previously the mandatory resource components were replacing the @ResourceDependency components when created. MyFaces keeps trying to add the @ResourceDependency components to the list if not present already, if components were replaced MyFaces would add @ResourceDependency back in, thus causing this issue.

          Show
          Mircea Toma added a comment - Changed BridgeSetup to collect the mandatory resource components that need to replace the @ResourceDependency components and then replace them all at once. Previously the mandatory resource components were replacing the @ResourceDependency components when created. MyFaces keeps trying to add the @ResourceDependency components to the list if not present already, if components were replaced MyFaces would add @ResourceDependency back in, thus causing this issue.
          Hide
          Mircea Toma added a comment -

          Use non-transient components to replace the @ResourceDependency components to avoid unwanted re-ordering of the component resources.

          Show
          Mircea Toma added a comment - Use non-transient components to replace the @ResourceDependency components to avoid unwanted re-ordering of the component resources.
          Hide
          Ken Fyten added a comment -

          SInce the rvn # 26747 commit for this JIRA the ice:inputRichText component no longer loads properly.

          Show
          Ken Fyten added a comment - SInce the rvn # 26747 commit for this JIRA the ice:inputRichText component no longer loads properly.
          Hide
          Mircea Toma added a comment -

          Changed empty string 'library' resource parameter to null to make sure that ResourceHandler.createResource() method will properly locate the file.

          Show
          Mircea Toma added a comment - Changed empty string 'library' resource parameter to null to make sure that ResourceHandler.createResource() method will properly locate the file.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: