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
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
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
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:
- If ICESOFT fixes the issue with the h:commandLink in combination with f:ajax disabled=true the h:commandButton stills works but an f:param tag can't be attached to it but at least to h:commandLink's
- If the mojarra guys fix the mentioned h:commandButton problem f:param tags can be applied but h:commandButton in combination with f:ajax disabled=true doesnt work and of course the h:commandLink as well
- If ICESOFT AND the mojarra guys fix both isses: Everything works! ICESOFT should just pay attention that after the mojarra fix a h:commandButton has the onclick="mojarra.jsfcljs(...) function applied as the h:commandLink has it right now
This has been verified fixed in the reported cases. If specific cases are found where ajax disabled does not interact correctly with parameters, specific JIRAs can be created.