ICEfaces
  1. ICEfaces
  2. ICE-8324

TabSet regression in showcase samples

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0.BETA2
    • Fix Version/s: 3.2
    • Component/s: ACE-Components, Sample Apps
    • Labels:
      None
    • Environment:
      ACE
    • Affects:
      Sample App./Tutorial

      Description

      MyFaces showcase regression testing:

      TabSet - Server Side - switching tabs doesn't load tab content for 2nd and third server tab; in order to load 2nd server tab, must go to 3rd server tab and go back to 2nd server tab; also, multiple tab selection occuring (see attached image)

      TabSet - Proxy - switching tabs doesn't load tab content for 2nd and third server tab; in order to load 2nd server tab, must go to 3rd server tab and go back to 2nd server tab; also, multiple tab selection occuring (see attached image)

        Activity

        Mark Collette created issue -
        Mark Collette made changes -
        Field Original Value New Value
        Link This issue is duplicated by ICE-8325 [ ICE-8325 ]
        Mark Collette made changes -
        Link This issue is duplicated by ICE-8327 [ ICE-8327 ]
        Mark Collette made changes -
        Link This issue is duplicated by ICE-8329 [ ICE-8329 ]
        Mark Collette made changes -
        Link This issue is duplicated by ICE-8326 [ ICE-8326 ]
        Mark Collette made changes -
        Link This issue is duplicated by ICE-8328 [ ICE-8328 ]
        Mark Collette made changes -
        Link This issue is duplicated by ICE-8330 [ ICE-8330 ]
        Mark Collette made changes -
        Assignee Mark Collette [ mark.collette ]
        Mark Collette made changes -
        Summary TabSet regression TabSet regression in showcase samples
        Salesforce Case []
        Component/s Sample Apps [ 10010 ]
        Description TabSet - Server Side - switching tabs doesn't load tab content for 2nd and third server tab; in order to load 2nd server tab, must go to 3rd server tab and go back to 2nd server tab; also, multiple tab selection occuring (see attached image)
        TabSet - Proxy - switching tabs doesn't load tab content for 2nd and third server tab; in order to load 2nd server tab, must go to 3rd server tab and go back to 2nd server tab; also, multiple tab selection occuring (see attached image)
        MyFaces showcase regression testing:

        TabSet - Server Side - switching tabs doesn't load tab content for 2nd and third server tab; in order to load 2nd server tab, must go to 3rd server tab and go back to 2nd server tab; also, multiple tab selection occuring (see attached image)

        TabSet - Proxy - switching tabs doesn't load tab content for 2nd and third server tab; in order to load 2nd server tab, must go to 3rd server tab and go back to 2nd server tab; also, multiple tab selection occuring (see attached image)
        Mark Collette made changes -
        Link This issue is duplicated by ICE-8331 [ ICE-8331 ]
        Mark Collette made changes -
        Link This issue is duplicated by ICE-8333 [ ICE-8333 ]
        Hide
        Mark Collette added a comment -

        Verified that this issue occurs only when running with MyFaces and not Mojarra. It appears that the component is not being state saved/restored, and so is losing some state that it needs when changing tabs.

        The Field in question that's coming back null each lifecycle is in TabSetMeta:
        @Field(javadoc="Maintains the record of which tabs have been visited")
        private List visitedTabClientIds;

        Here is the dom update comes to the browser, when the user clicks to go to the second tab:

        <update id="form:tabSet_safe_0"><![CDATA[<div id="form:tabSet_safe_0"><div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="form:pane2" role="tabpanel" tabindex="0"><span id="form:pane2Body">Second Body</span></div></div>]]></update>

        One would expect a closing of tabSet_safe_0, and the new tab content to be in tabSet_safe_1, but since visitedTabClientIds is null, it loses the history of having used tabSet_safe_0, and so tries to recycle it, which the javascript doesn't handle.

        Audited the subversion commits to the ACE generator, but nothing in it has changed in that area. Seems to indicate we may have made core changes that might affect state saving. It wouldn't seem likely, but just for completeness, tested with rolling back the recent change to tabset.js, but that had no effect.

        Ran the tabset regression suite, with MyFaces, and found that it does work, so this is specific to the showcase application.

        Identified key commits to MyFaces jars, core changes, and showcase application, and worked back through them to see when this problem started. It's revision 29753, which is for:
        ICE-7283 : Showcase templates should not have ids on non-component markup

        My current theory is that now that the div(s) are h:panelGroup(s), the id is the component id, and maybe now we have duplicate ids. Although there should be existing functionality to report that if it's the case.

        Show
        Mark Collette added a comment - Verified that this issue occurs only when running with MyFaces and not Mojarra. It appears that the component is not being state saved/restored, and so is losing some state that it needs when changing tabs. The Field in question that's coming back null each lifecycle is in TabSetMeta: @Field(javadoc="Maintains the record of which tabs have been visited") private List visitedTabClientIds; Here is the dom update comes to the browser, when the user clicks to go to the second tab: <update id="form:tabSet_safe_0"><![CDATA [<div id="form:tabSet_safe_0"><div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="form:pane2" role="tabpanel" tabindex="0"><span id="form:pane2Body">Second Body</span></div></div>] ]></update> One would expect a closing of tabSet_safe_0, and the new tab content to be in tabSet_safe_1, but since visitedTabClientIds is null, it loses the history of having used tabSet_safe_0, and so tries to recycle it, which the javascript doesn't handle. Audited the subversion commits to the ACE generator, but nothing in it has changed in that area. Seems to indicate we may have made core changes that might affect state saving. It wouldn't seem likely, but just for completeness, tested with rolling back the recent change to tabset.js, but that had no effect. Ran the tabset regression suite, with MyFaces, and found that it does work, so this is specific to the showcase application. Identified key commits to MyFaces jars, core changes, and showcase application, and worked back through them to see when this problem started. It's revision 29753, which is for: ICE-7283 : Showcase templates should not have ids on non-component markup My current theory is that now that the div(s) are h:panelGroup(s), the id is the component id, and maybe now we have duplicate ids. Although there should be existing functionality to report that if it's the case.
        Hide
        Mark Collette added a comment -

        Tried changing the ids to for sure be unique, and also tried to remove the ids. Neither fixed the problem, and both broke the styling of the app, since the styling highly depends on ids and less on class names than one would hope, especially in this css file:

        icefaces3/samples/showcase/showcase/src/main/webapp/resources/css/demo_template.css

        Show
        Mark Collette added a comment - Tried changing the ids to for sure be unique, and also tried to remove the ids. Neither fixed the problem, and both broke the styling of the app, since the styling highly depends on ids and less on class names than one would hope, especially in this css file: icefaces3/samples/showcase/showcase/src/main/webapp/resources/css/demo_template.css
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8325 [ ICE-8325 ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8327 [ ICE-8327 ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8326 [ ICE-8326 ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8330 [ ICE-8330 ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8331 [ ICE-8331 ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8333 [ ICE-8333 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.1 [ 10312 ]
        Fix Version/s 3.1.0.RC1 [ 10337 ]
        Affects [Sample App./Tutorial]
        Assignee Priority P2
        Assignee Mark Collette [ mark.collette ] Carlo Guglielmin [ carlo.guglielmin ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8328 [ ICE-8328 ]
        Ken Fyten made changes -
        Link This issue is duplicated by ICE-8329 [ ICE-8329 ]
        Hide
        Mark Collette added a comment -

        We need to essentially revert ICE-7283, and then remove the ids from all the divs, and then updating the css to not select based on those ids but instead style classes which would be added to the divs.

        Show
        Mark Collette added a comment - We need to essentially revert ICE-7283 , and then remove the ids from all the divs, and then updating the css to not select based on those ids but instead style classes which would be added to the divs.
        Ken Fyten made changes -
        Comment [ There was a problem with the jira system over the weekend, where it seemed that jiras were not being created, so I ended up making a lot of duplicates while trying to make it work.
        ]
        Hide
        Ken Fyten added a comment -

        Okay, please implement using h:panelGroups (without IDs specified), and changing the CSS to use classes instead of IDs. Then we'll retest to see if MyFaces like it that way or not.

        Show
        Ken Fyten added a comment - Okay, please implement using h:panelGroups (without IDs specified), and changing the CSS to use classes instead of IDs. Then we'll retest to see if MyFaces like it that way or not.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #29905 Tue Jul 10 12:34:25 MDT 2012 carlo.guglielmin ICE-8324 - Reworked panelGroups (that were div replacements) to not use IDs for style.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/templates/main-template.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase-nonredirect.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/css/demo_template.css
        Hide
        Carlo Guglielmin added a comment -

        r29905 - Changed all the panelGroup IDs to be styleClass instead and modified to the CSS to match. I kept the IDs in there though in case some backend code or components rely on them (for example for a find component lookup) since that seemed like the least destructive approach.

        Re-assigning to Ken to delegate for re-testing.

        Show
        Carlo Guglielmin added a comment - r29905 - Changed all the panelGroup IDs to be styleClass instead and modified to the CSS to match. I kept the IDs in there though in case some backend code or components rely on them (for example for a find component lookup) since that seemed like the least destructive approach. Re-assigning to Ken to delegate for re-testing.
        Carlo Guglielmin made changes -
        Assignee Carlo Guglielmin [ carlo.guglielmin ] Ken Fyten [ ken.fyten ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30015 Mon Jul 16 18:09:14 MDT 2012 mark.collette ICE-8324 : TabSet regression in showcase samples
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/templates/main-template.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase-nonredirect.xhtml
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2 P1
        Assignee Ken Fyten [ ken.fyten ] Mark Collette [ mark.collette ]
        Hide
        Mark Collette added a comment -

        Changing all h:panelGroup components, which had ids, to div tags without ids, worked. Merely removing the ids from the h:panelGroup(s) did not work.

        icefaces 3 trunk
        Subversion 30015

        Show
        Mark Collette added a comment - Changing all h:panelGroup components, which had ids, to div tags without ids, worked. Merely removing the ids from the h:panelGroup(s) did not work. icefaces 3 trunk Subversion 30015
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30023 Tue Jul 17 11:37:10 MDT 2012 carlo.guglielmin ICE-8324 - More div/panelGroup adjustments. Reverted some of the divs to panelGroups where a div isn't wanted (ie: where layout wasn't block on the panelGroup) to help fix an issue seen in IE9 around the menu
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/templates/main-template.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase-nonredirect.xhtml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30027 Tue Jul 17 12:20:50 MDT 2012 carlo.guglielmin ICE-8324 - Revert 30015 at Ken's request, so we are back to using h:panelGroups properly but have an issue with MyFaces tabs as a result
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/templates/main-template.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase-nonredirect.xhtml
        Hide
        Carlo Guglielmin added a comment -

        r30023 - Slight change to div/panelGroup. main-template.xhtml was using panelGroups without layout="block" (so a div wasn't rendered out) but that was changed to a plain div, which may have been causing the IE9 style issue.

        Show
        Carlo Guglielmin added a comment - r30023 - Slight change to div/panelGroup. main-template.xhtml was using panelGroups without layout="block" (so a div wasn't rendered out) but that was changed to a plain div, which may have been causing the IE9 style issue.
        Hide
        Carlo Guglielmin added a comment -

        r30027 - Reverted r30015 at Ken's request, so we are back to all h:panelGroups with no divs. It will cause problems with the MyFaces tabs but is a better practice for users looking at the code.

        Show
        Carlo Guglielmin added a comment - r30027 - Reverted r30015 at Ken's request, so we are back to all h:panelGroups with no divs. It will cause problems with the MyFaces tabs but is a better practice for users looking at the code.
        Ken Fyten made changes -
        Fix Version/s 3.2 [ 10338 ]
        Fix Version/s 3.1 [ 10312 ]
        Hide
        Mark Collette added a comment -

        When we next look into this, see if it's still happening, and check if the view state key is being submitted. That shouldn't be a problem due to the fixviewstate javascript. This behaviour is eerily similar to a maintenance branch tabSetProxy issue that was due to the view state key not being submitted, which was fixed by backporting the fixviewstate javascript.

        Show
        Mark Collette added a comment - When we next look into this, see if it's still happening, and check if the view state key is being submitted. That shouldn't be a problem due to the fixviewstate javascript. This behaviour is eerily similar to a maintenance branch tabSetProxy issue that was due to the view state key not being submitted, which was fixed by backporting the fixviewstate javascript.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #31475 Mon Oct 15 12:23:39 MDT 2012 mark.collette ICE-8324 : TabSet regression in showcase samples
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetMeta.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSet.java
        Hide
        Mark Collette added a comment - - edited

        There's no difference between what is being submitted for MyFaces and Mojarra.
        The difference between Mojarra and MyFaces is that with MyFaces, TabSet.clearInitialState() is getting called on every postback in the middle of rendering by saveState which is called from context.getApplication().getStateManager().getViewState(context) which is called from org.icefaces.impl.event.FixViewState.ScriptWriter.encode. State saving is supposed to happen after rendering, not in the middle of it. If I disable this FixViewState rendering code, then the problem goes away.
        With Mojarra the clearInitialState() method is not called at all in the postbacks. Possibly getViewState may not trigger state saving.
        It should be noted, that if I click on the TabSet and get the Overview, that is a GET request. Changing the tabs there works. Clicking on Server tabs and then back again will lead to tab changes not working in this Overview. So it's not that any one example is broken, it's that when the TabSet is created from a GET it will work, and when it is created on a POSTback it does not work. Clicking between TabSet examples results in a dynamic ui:include that creates a new h:form and new ace:tabSet on the POSTback. The FixViewState code won't call getViewState on a GET, just on a POSTback.

        Show
        Mark Collette added a comment - - edited There's no difference between what is being submitted for MyFaces and Mojarra. The difference between Mojarra and MyFaces is that with MyFaces, TabSet.clearInitialState() is getting called on every postback in the middle of rendering by saveState which is called from context.getApplication().getStateManager().getViewState(context) which is called from org.icefaces.impl.event.FixViewState.ScriptWriter.encode . State saving is supposed to happen after rendering, not in the middle of it. If I disable this FixViewState rendering code, then the problem goes away. With Mojarra the clearInitialState() method is not called at all in the postbacks. Possibly getViewState may not trigger state saving. It should be noted, that if I click on the TabSet and get the Overview, that is a GET request. Changing the tabs there works. Clicking on Server tabs and then back again will lead to tab changes not working in this Overview. So it's not that any one example is broken, it's that when the TabSet is created from a GET it will work, and when it is created on a POSTback it does not work. Clicking between TabSet examples results in a dynamic ui:include that creates a new h:form and new ace:tabSet on the POSTback. The FixViewState code won't call getViewState on a GET, just on a POSTback.
        Hide
        Jerome Ruzol added a comment - - edited

        Confirmed that issue has been resolved within showcase w/myfaces and ace:tabSet with myfaces regressions re-run (Also confirmed to pass manually).

        Show
        Jerome Ruzol added a comment - - edited Confirmed that issue has been resolved within showcase w/myfaces and ace:tabSet with myfaces regressions re-run (Also confirmed to pass manually).
        Migration made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Icefaces Administrator made changes -
        Security Private [ 10001 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1 [ 10010 ]
        Hide
        Mark Collette added a comment -

        Must have lost the commit comment.

        Added hack to work-around the state saving issue. Probably wouldn't work with serialised/compressed/client-side state saving.

        icefaces3 trunk
        Subversion 31475

        Show
        Mark Collette added a comment - Must have lost the commit comment. Added hack to work-around the state saving issue. Probably wouldn't work with serialised/compressed/client-side state saving. icefaces3 trunk Subversion 31475

          People

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

            Dates

            • Created:
              Updated:
              Resolved: