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

        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.
        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.
        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
        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
        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.
        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).

          People

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

            Dates

            • Created:
              Updated:
              Resolved: