2 Replies Latest reply on Sep 18, 2008 9:38 AM by tnabeel

    jQuery selection failing on portletbridge-1.0.0.B4

    tnabeel

      The following selection returns the correct result when I use portletbridge-1.0.0.B3 but returns an empty set when I upgrade to portletbridge-1.0.0.B4:

      jQuery('div#child', jQuery('div#parent'));


      xhtml source:
      <div id="parent">
       <div id="child"/>
      </div>


      The selection works with richfaces-3.2.2.GA on JBoss 4.2.3.GA and works with portletbridge-1.0.0.B3/richfaces-3.2.1.GA.jar on JBoss Portal 2.6.6.GA

      It fails with portletbridge-1.0.0.B4/richfaces-3.2.2.GA on JBoss Portal 2.6.6.GA.

      I would really appreciate help on getting around this.


        • 1. Re: jQuery selection failing on portletbridge-1.0.0.B4
          wesleyhales

          The bridge should not affect js dom calls. Are you getting error in your js console of your browser?

          • 2. Re: jQuery selection failing on portletbridge-1.0.0.B4
            tnabeel

            The execution of the query itself does not raise an error. The query simply fails to return a result. The code following it expects a non-empty set.

            I noticed that the richfaces demo war that's packaged with the B4 version of the bridge has the following lines below commented out in jboss-portlet.xml while the B3 version had them uncommented.

            <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript"></script>
            <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript"></script>
            <link rel="stylesheet" type="text/css" href="/faces/rfResorg/richfaces/renderkit/html/css/basic_both.xcss"/>

            Did portlet-bridge developers encounter issues with these imports? Is portlet-bridge-B4 adding or changing the response in any way that might affect script execution? I tested with and without these imports without success.

            The jQuery
            jQuery('div#child', jQuery('div#parent'));
            works on JBoss Portal 2.6.6.GA / portalbridge B3 / richfaces 3.2.1.GA. I created this test query to demonstrate the failure of jQuery to find a child element within a context tree in portalbridge-B4/richfaces3.2.2.GA. It's a very simple jQuery.

            I thought that the jquery.js that's packaged with richfaces3.2.2.GA might be causing the problem but I extracted it and the above query works fine with that. Also, I tested the above query with richfaces3.2.2.GA on JBoss 4.2.3.GA. The query, of course, works if you test within a test html page outside of servlet container and imported jQuery.1.2.6.js.

            Thank you for your response. I would really appreciate more investigation.