Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-2.0.0.GA
-
Fix Version/s: 3.0.RC1, 3.0, EE-2.0.0.GA_P01
-
Component/s: Bridge
-
Labels:None
-
Environment:windows 7, jdk 1.6, eclipse Indigo
Description
Bug: Setting <f:ajax disabled="true"> does not work for h:commandLink
Problem:
In a Portal Envrionement, such as Liferay, you sometimes need to trigger an regular (non-ajax) Post Call which triggers the Portal's ACTION_PHASE. The problem is that it is not going to work for commandLinks. It looks like as soon as JSF decorates a commandButton or a commandLink with the onclick="mojarra.jsfcljs(document.getElementById('myForm'),{'myForm:noneButton2':'myForm:noneButton2'},'');return false" function, ICEfaces is having troubles to detect whether these components have really been disabled via f:ajax disable=true
The commandButton actually works in ICEfaces but as soon as the mojarra patch is applied the commandButtons acts like a commandLink (as you would expect) and thus none of them interprets the f:ajax disabled="true" correctly and a ajax post is sent instead
What is the mojarra patch:
There is a bug in mojarra which fails to decorate the commandButton having an onclick method if the f:ajax disabled is set to true: thus the f:param is not set to the requestParameterMap
In order to Fix that Behavoir patch Line: 137:
FROM:
RenderKitUtils.renderOnclick(context, component, params, null, false);
TO:
RenderKitUtils.renderOnclick(context, component, params, null, true);
Problem:
In a Portal Envrionement, such as Liferay, you sometimes need to trigger an regular (non-ajax) Post Call which triggers the Portal's ACTION_PHASE. The problem is that it is not going to work for commandLinks. It looks like as soon as JSF decorates a commandButton or a commandLink with the onclick="mojarra.jsfcljs(document.getElementById('myForm'),{'myForm:noneButton2':'myForm:noneButton2'},'');return false" function, ICEfaces is having troubles to detect whether these components have really been disabled via f:ajax disable=true
The commandButton actually works in ICEfaces but as soon as the mojarra patch is applied the commandButtons acts like a commandLink (as you would expect) and thus none of them interprets the f:ajax disabled="true" correctly and a ajax post is sent instead
What is the mojarra patch:
There is a bug in mojarra which fails to decorate the commandButton having an onclick method if the f:ajax disabled is set to true: thus the f:param is not set to the requestParameterMap
In order to Fix that Behavoir patch Line: 137:
FROM:
RenderKitUtils.renderOnclick(context, component, params, null, false);
TO:
RenderKitUtils.renderOnclick(context, component, params, null, true);
Issue Links
- depends on
-
ICE-7054 Setting <f:ajax disabled="true"> does not work for h:commandLink
- Closed
Activity
Patrick Dobler
created issue -
Patrick Dobler
made changes -
Field | Original Value | New Value |
---|---|---|
Attachment | icefacesSupport_ICE-7405_part1.zip [ 13714 ] |
Patrick Dobler
made changes -
Tyler Johnson
made changes -
Salesforce Case | [5007000000JMey8] |
Ken Fyten
made changes -
Assignee | Ted Goddard [ ted.goddard ] |
Ted Goddard
made changes -
Attachment | application.js [ 13720 ] | |
Attachment | submit.js [ 13721 ] |
Patrick Dobler
made changes -
Attachment | icefaces_7405.zip [ 13722 ] |
Patrick Dobler
made changes -
Attachment |
icefacesSupport_ |
Patrick Dobler
made changes -
Attachment | icefaces_7405.xlsx [ 13723 ] |
Ken Fyten
made changes -
Fix Version/s | EE-2.0.0.GA_P01 [ 10271 ] | |
Fix Version/s | 2.1 [ 10241 ] |
Patrick Dobler
made changes -
Attachment | icefaces_7405_R2.xlsx [ 13725 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #26282 | Tue Nov 08 13:11:15 MST 2011 | ted.goddard | capture event from firefox stack to support f:ajax disabled with params ( |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/core/src/main/javascript/application.js
MODIFY /icefaces2/trunk/icefaces/core/src/main/javascript/submit.js |
Tyler Johnson
made changes -
Summary | Setting <f:ajax disabled="true"> does not work for h:commandLink and h:commandButton having a f:param doesnt work | Setting <f:ajax disabled="true"> does not work for h:commandLink and h:commandButton having an f:param |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #26310 | Wed Nov 09 15:09:31 MST 2011 | ted.goddard | return null extracted element when event is null ( |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/core/src/main/javascript/submit.js
|
Ted Goddard
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 3.0.RC1 [ 10300 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Please find attached a demo application
How to import to Eclipse:
file -> import -> existing project into workspace -> select archieve file -> finish
How to verify the mojarra bug:
1. Please remove the icefaces-ee-2.0.0-INSIEME2.jar and icefaces-ee-compat-2.0.0-INSIEME2.jar from to /WEB-INF/lib
2. Start the server
3. go to: http://localhost:8080/icefacesSupport/JSFBugCommandButton.xhtml
4. Follow instuctions
5. Patch the com.sun.faces.renderkit.html_basic.ButtonRenderer as descibred above
6. Start the server again
7. go to: http://localhost:8080/icefacesSupport/JSFBugCommandButton.xhtml
8. Follow instuctions
How to verify the icefaces bug:
1. Please add the icefaces-ee-2.0.0-INSIEME2.jar and icefaces-ee-compat-2.0.0-INSIEME2.jar to /WEB-INF/lib
2. Start the server
3. go to: http://localhost:8080/icefacesSupport/ICEfacesBugCommandLink.xhtml
4. Follow instuctions
summa summarum: