ICEfaces
  1. ICEfaces
  2. ICE-7693

ace:tabSet: Tabs not loading completely in server side mode when ace:ajax is used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:

      Description

      When ace:ajax is added to an ace:tabSet in server side mode sometimes the tabs don't change completely. Sometimes you can see the initial tab fading out or the new tab fading in, or sometimes the content of the tabSet becomes empty and nothing happens. This doesn't occur when the ace:ajax component is removed from the tabSet.
       
      To reproduce:
      1. Build / deploy test app from above location
      2. Navigate to TabSet Ajax test (bottom of the page)
      3. Try changing tabs in any of the server side tests
      It can be quite inconsistent so if it works the first time just try again.

        Activity

        Hide
        Mark Collette added a comment -

        Analysis of the differences of code paths take between the ajax and non-ajax cases showed that the working non-ajax case had code executing after the successful conclusion of the form submit, which was not run in the ajax case. The code was refactored to run in both scenarios, and then the ajax case started working properly.

        icefaces3 trunk
        Subversion 28150

        icefaces-3.0.x-maintenance
        Subversion 28151

        Show
        Mark Collette added a comment - Analysis of the differences of code paths take between the ajax and non-ajax cases showed that the working non-ajax case had code executing after the successful conclusion of the form submit, which was not run in the ajax case. The code was refactored to run in both scenarios, and then the ajax case started working properly. icefaces3 trunk Subversion 28150 icefaces-3.0.x-maintenance Subversion 28151
        Hide
        Cruz Miraback added a comment -

        This issue is still occurring for me on Icefaces3.0.x-maintenance revision# 28204. I tested in IE8/9, FF3.6/10, Chrome17 and I am still unable to switch tabs when ace:ajax is added to an ace:tabSet in server side mode. Please investigate.

        Show
        Cruz Miraback added a comment - This issue is still occurring for me on Icefaces3.0.x-maintenance revision# 28204. I tested in IE8/9, FF3.6/10, Chrome17 and I am still unable to switch tabs when ace:ajax is added to an ace:tabSet in server side mode. Please investigate.
        Hide
        Mark Collette added a comment -

        Investigation with QA team found that ICE-7501 had diverged the trunk from the branch, so that ace:ajax javascript calls were happening differently. The branch was still using the javascript function, instead of javascript parameters approach, to reduce release regression risk.

        Essentially, the branch lacked a simple means for the tabSet's javascript to make use of the onsuccess callback for its own processing. A technique was used that builds on a previous extension mechanism, for creating a means for the component to specify its own onsuccess handling, before the application's from the ace:ajax tag. There was an implementation difficulty due to arguments scoping of nested functions, but that was worked around.

        icefaces-3.0.x-maintenance
        Subversion 28309

        Show
        Mark Collette added a comment - Investigation with QA team found that ICE-7501 had diverged the trunk from the branch, so that ace:ajax javascript calls were happening differently. The branch was still using the javascript function, instead of javascript parameters approach, to reduce release regression risk. Essentially, the branch lacked a simple means for the tabSet's javascript to make use of the onsuccess callback for its own processing. A technique was used that builds on a previous extension mechanism, for creating a means for the component to specify its own onsuccess handling, before the application's from the ace:ajax tag. There was an implementation difficulty due to arguments scoping of nested functions, but that was worked around. icefaces-3.0.x-maintenance Subversion 28309
        Hide
        Cruz Miraback added a comment -

        The original issue has been fixed, although when testing I've come across some other issues:

        "serverSideTabChange" Event Test w/ TabChangeListener attribute

        • When changing tabs with this configuration the event is fired but the second tab's content is never displayed. I am able to make the second tab content render if I click the 'Reset Values' button on the test page.

        "serverSideTabChange" Event Test w/ Ajax Disabled

        • When changing tabs with this configuration the second tab's content is never displayed.

        To reproduce:
        1. Build / deploy test app from this location: I've used this test here: http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/tabset
        2. Navigate to TabSet Ajax test
        3. Try changing tabs on each of the above test

        This is maintenance branch revision# 28309.

        Show
        Cruz Miraback added a comment - The original issue has been fixed, although when testing I've come across some other issues: "serverSideTabChange" Event Test w/ TabChangeListener attribute When changing tabs with this configuration the event is fired but the second tab's content is never displayed. I am able to make the second tab content render if I click the 'Reset Values' button on the test page. "serverSideTabChange" Event Test w/ Ajax Disabled When changing tabs with this configuration the second tab's content is never displayed. To reproduce: 1. Build / deploy test app from this location: I've used this test here: http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/tabset 2. Navigate to TabSet Ajax test 3. Try changing tabs on each of the above test This is maintenance branch revision# 28309.
        Hide
        Mark Collette added a comment -

        For this issue: "serverSideTabChange" Event Test w/ TabChangeListener attribute
        I tested in Firefox, Chrome, Safari and couldn't figure out why I could not reproduce the issue that QA had found. But then I ran an svn diff on tabSetAjax.xhtml and found this local change:

        192-168-1-4:tabset mark$ svn diff web/tabSetAjax.xhtml
        Index: web/tabSetAjax.xhtml
        ===================================================================
        — web/tabSetAjax.xhtml (revision 30149)
        +++ web/tabSetAjax.xhtml (working copy)
        @@ -110,7 +110,7 @@
        <ace:tabPane id="tabPane2" label="TabPane 2">
        <h:outputText id="tabPane2Content" value="TabPane 2 Content"/>
        </ace:tabPane>

        • <ace:ajax event="serverSideTabChange" execute="@all" render="statusMsg" listener="$ {ajaxTestBean.ajaxEventListener}" />
          + <ace:ajax event="serverSideTabChange" execute="@all" render="@this statusMsg" listener="${ajaxTestBean.ajaxEventListener}

          " />
          </ace:tabSet>
          <h3>Results:</h3>
          <ul>
          @@ -173,4 +173,4 @@
          </h:panelGroup>
          <a href="index.html">Goto Main page</a>
          </h:body>
          -</html>
          \ No newline at end of file
          +</html>

        Basically, at some point I had seen that this wasn't working properly, modified the test app, and manually added @this to the render attribute on the ace:ajax tag. The component relies on itself getting rendered, so that its javascript will execute after the tab change. In the other tests on the same page, either @all is given, or nothing is specified to render, in which case the default is @all in TabSetMeta. The Ajax disabled test actually has the same problem with not executing @this, since execute is specified in the ace:ajax tag, so @all is no longer the default. Although fixing this issue still doesn't address the ajax disabled problem.

        For the branch, the code fix for the component is straightforward, just need to add "@this" the render index of the arguments (as well as to the execute index, which isn't being shown in the test but is still needed)

        icefaces-3.0.x-maintenance
        Subversion 28342

        Show
        Mark Collette added a comment - For this issue: "serverSideTabChange" Event Test w/ TabChangeListener attribute I tested in Firefox, Chrome, Safari and couldn't figure out why I could not reproduce the issue that QA had found. But then I ran an svn diff on tabSetAjax.xhtml and found this local change: 192-168-1-4:tabset mark$ svn diff web/tabSetAjax.xhtml Index: web/tabSetAjax.xhtml =================================================================== — web/tabSetAjax.xhtml (revision 30149) +++ web/tabSetAjax.xhtml (working copy) @@ -110,7 +110,7 @@ <ace:tabPane id="tabPane2" label="TabPane 2"> <h:outputText id="tabPane2Content" value="TabPane 2 Content"/> </ace:tabPane> <ace:ajax event="serverSideTabChange" execute="@all" render="statusMsg" listener="$ {ajaxTestBean.ajaxEventListener}" /> + <ace:ajax event="serverSideTabChange" execute="@all" render="@this statusMsg" listener="${ajaxTestBean.ajaxEventListener} " /> </ace:tabSet> <h3>Results:</h3> <ul> @@ -173,4 +173,4 @@ </h:panelGroup> <a href="index.html">Goto Main page</a> </h:body> -</html> \ No newline at end of file +</html> Basically, at some point I had seen that this wasn't working properly, modified the test app, and manually added @this to the render attribute on the ace:ajax tag. The component relies on itself getting rendered, so that its javascript will execute after the tab change. In the other tests on the same page, either @all is given, or nothing is specified to render, in which case the default is @all in TabSetMeta. The Ajax disabled test actually has the same problem with not executing @this, since execute is specified in the ace:ajax tag, so @all is no longer the default. Although fixing this issue still doesn't address the ajax disabled problem. For the branch, the code fix for the component is straightforward, just need to add "@this" the render index of the arguments (as well as to the execute index, which isn't being shown in the test but is still needed) icefaces-3.0.x-maintenance Subversion 28342
        Hide
        Mark Collette added a comment -

        Same problem was on trunk, but the resolution was technically different due to the ICE-7501 discrepancy.

        trunk
        Subversion 28343

        Show
        Mark Collette added a comment - Same problem was on trunk, but the resolution was technically different due to the ICE-7501 discrepancy. trunk Subversion 28343
        Hide
        Mark Collette added a comment -

        The problem with Ajax Disabled is part of a larger issue, which is encapsulated in this jira:
        ICE-7908 : ace:ajax disabled inconsistent behaviour

        Show
        Mark Collette added a comment - The problem with Ajax Disabled is part of a larger issue, which is encapsulated in this jira: ICE-7908 : ace:ajax disabled inconsistent behaviour

          People

          • Assignee:
            Mark Collette
            Reporter:
            Cruz Miraback
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: