ICEfaces
  1. ICEfaces
  2. ICE-9340

Tabset with Menu in Label Facet Causing Double Submit

    Details

    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      The application is using ace:tabSet with ace:menuBar components in the ace:tabPane "label" facets. The menuBar selections are supposed to switch tabs and/or change the tab content. When switching tabs, a post is performed by the tabSet and the menuBar, resulting in a flicker of the tabPane content from the first post which is quickly replaced by the tabPane content resulting from the second menuBar post.

      The problem has been traced to ice.ace.util.isEventSourceInputElement in util.js. The menu has an anchor with a child span that is identified as the event source.
      1. ICE9340.txt
        3 kB
        Brad Kroeger
      2. WithoutICE9340.txt
        4 kB
        Brad Kroeger

        Activity

        Brad Kroeger created issue -
        Brad Kroeger made changes -
        Field Original Value New Value
        Assignee Ken Fyten [ ken.fyten ]
        Brad Kroeger made changes -
        Attachment Test.war [ 16034 ]
        Hide
        Brad Kroeger added a comment -

        Attached test application that can be run on Tomcat 7. Hover over the 'My Customer Pricing' tab, select the 'Change Request List' menu item and you should see the two posts performed with the source event coming from the span tag.

        Show
        Brad Kroeger added a comment - Attached test application that can be run on Tomcat 7. Hover over the 'My Customer Pricing' tab, select the 'Change Request List' menu item and you should see the two posts performed with the source event coming from the span tag.
        Ken Fyten made changes -
        Fix Version/s 3.4 [ 10770 ]
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Mark Collette [ mark.collette ]
        Assignee Priority P2 [ 10011 ]
        Hide
        Mark Collette added a comment -

        Right now ice.ace.util.isEventSourceInputElement checks to see if the event source/target is an anchor / button tag, whereas it would need to walk up the parent hierarchy and see if it is in an anchor / button, that is not itself the element that we're trapping on with isEventSourceInputElement.

        Show
        Mark Collette added a comment - Right now ice.ace.util.isEventSourceInputElement checks to see if the event source/target is an anchor / button tag, whereas it would need to walk up the parent hierarchy and see if it is in an anchor / button, that is not itself the element that we're trapping on with isEventSourceInputElement.
        Ken Fyten made changes -
        Assignee Priority P2 [ 10011 ] P1 [ 10010 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36663 Thu Jul 11 19:47:01 MDT 2013 mark.collette ICE-9340 : Tabset with Menu in Label Facet Causing Double Submit
        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/resources/icefaces.ace/util/util.js
        Hide
        Mark Collette added a comment -

        Added the logic, and intentionally changing tabs works, as well as summoning the menu, all with the proper singular submits.

        icefaces3 trunk
        Subversion 36663

        Show
        Mark Collette added a comment - Added the logic, and intentionally changing tabs works, as well as summoning the menu, all with the proper singular submits. icefaces3 trunk Subversion 36663
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Brad Kroeger made changes -
        Salesforce Case Reference 5007000000UaCTLAA3
        Hide
        Brad Kroeger added a comment -

        Tested this in a client application. When selecting other tabs the tab content is no longer changed. It appears that previously, the second post was sending back the new tab content.

        Attaching a test war file.

        Also attaching files with output from firebug showing the result of the post in both cases (for diffing). I haven't included the result of the second post in the file withoutICE9340.txt

        Show
        Brad Kroeger added a comment - Tested this in a client application. When selecting other tabs the tab content is no longer changed. It appears that previously, the second post was sending back the new tab content. Attaching a test war file. Also attaching files with output from firebug showing the result of the post in both cases (for diffing). I haven't included the result of the second post in the file withoutICE9340.txt
        Brad Kroeger made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Mark Collette [ mark.collette ] Ken Fyten [ ken.fyten ]
        Brad Kroeger made changes -
        Attachment Test.war [ 16538 ]
        Brad Kroeger made changes -
        Attachment WithoutICE9340.txt [ 16539 ]
        Attachment ICE9340.txt [ 16540 ]
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Mark Collette [ mark.collette ]
        Fix Version/s EE-3.3.0.GA_P02 [ 11371 ]
        Brad Kroeger made changes -
        Assignee Mark Collette [ mark.collette ] Ken Fyten [ ken.fyten ]
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
        Hide
        Mircea Toma added a comment -

        Brad, please describe the steps needed for reproducing the problem.

        Show
        Mircea Toma added a comment - Brad, please describe the steps needed for reproducing the problem.
        Hide
        Brad Kroeger added a comment -
        • Deploy Test.war to Tomcat 7
        • http://localhost:8080/Test/home.jsf will present you with a tabset - the second tab header contains a menu.
        • In the second tab if you select 'Change Request List' you should see the tab change to the second tab and an ace:dataTable in the tab cotnent, but nothing changes in the browser.
        Show
        Brad Kroeger added a comment - Deploy Test.war to Tomcat 7 http://localhost:8080/Test/home.jsf will present you with a tabset - the second tab header contains a menu. In the second tab if you select 'Change Request List' you should see the tab change to the second tab and an ace:dataTable in the tab cotnent, but nothing changes in the browser.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mircea Toma made changes -
        Comment [ Removing the commons-collections.jar was sufficient. ]
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment - - edited

        To me it looks like the application and components behave normally. In order to see the content change in the second tab one needs to select the tab first. Once selected the content will change when the menu in the label facet is used.

        If the expected behaviour is to switch to the second tab when the menu is used then McpController bean needs to have access to the GlobalBean to change the selected tab index (using GlobalBean.setVisibleTab).

        Show
        Mircea Toma added a comment - - edited To me it looks like the application and components behave normally. In order to see the content change in the second tab one needs to select the tab first. Once selected the content will change when the menu in the label facet is used. If the expected behaviour is to switch to the second tab when the menu is used then McpController bean needs to have access to the GlobalBean to change the selected tab index (using GlobalBean.setVisibleTab).
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: