ICEfaces
  1. ICEfaces
  2. ICE-7306

second ace:menubar actionListener not firing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7.0.12
      ICEfaces-2.1.0.BETA-10022011-src
    • Assignee Priority:
      P1

      Description

      In the Williams application, the ace:menubar located in the second form of the page is not having the action fired. Here are the findings of the Williams developers:

      The problem is that actions on JSF page do not trigger server-side action code. The issue is caused by ace:menuBar. Here is a typical menu item Onclick function that is generated by BaseMenuRenderer:

      <a onclick="if(!OneLineApp.performAction('Submit Confirmation',this))return;showProcessingMessage('Performing Action');;ice.ace.ab({source:'sub_0:listPgFrm:j_id15',process:'@all',params:{'ice.customUpdate':'sub_0:listPgFrm:j_id15'}});" href="#" class="wijmo-wijmenu-link ui-corner-all"><span class="wijmo-wijmenu-text"><span class="wijmo-wijmenu-text">Submit Confirmation</span></span></a>

      Note the highlighted code uses the component clientId. This client id is used in ice.ace.AjaxRequest as follows:

       

      148 var form = $(ice.ace.escapeClientId(cfg.source)).parents('form:first');

      149 if(form.length == 0) {

      150 form = $('form').eq(0);

      151 }

      It tries to get the containing form of the menu item using the clientId. Unfortunately the client id is never rendered into HTML by BaseMenuRenderer. So line 148 does not return anything and ICEFaces always uses the first form as the submitting form. Our navigation menu happens to be the first form so it works. Our action menu is not the first form, so the wrong form is submitted.

      The unresponsive second ace:menubar is reproducible in the poc. Screen 1 now has a ace:menubar with 'Print' in the top right of the tabpane content. When this menuitem is clicked, a post is sent to the server but the actionListener is not executed.

        Activity

        There are no subversion log entries for this issue yet.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: