Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1-Beta
-
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.
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
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Brad Kroeger
created issue -
Brad Kroeger
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Ken Fyten [ ken.fyten ] |
Brad Kroeger
made changes -
Attachment | Screen1.java [ 13614 ] | |
Attachment | screen1.xhtml [ 13615 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Assignee Priority | P1 | |
Assignee | Ken Fyten [ ken.fyten ] | Arturo Zambrano [ artzambrano ] |
Arturo Zambrano
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Arran Mccullough
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Arturo Zambrano
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Arran Mccullough
made changes -
Attachment | Case10445Example.war [ 13636 ] |
Arran Mccullough
made changes -
Attachment | Case10445Example.zip [ 13637 ] |
Arturo Zambrano
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 2.1-Beta2 [ 10294 ] |
Ken Fyten
made changes -
Security | Private [ 10001 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |