Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta1
-
Fix Version/s: 2.0.0
-
Component/s: None
-
Labels:None
-
Environment:Liferay 6.0.4 + PortletFaces-Bridge 2.0.0-BETA1 + ICEfaces 2.0 trunk revision 22133
Description
When the view is initially rendered with an HTTP-GET, the following <form> appears in the rendered markup of the page:
<form name="v31jf08" method="post" id="v31jf08" action="http://localhost:8080/web/guest/ice2?_1_WAR_icefaces2xcompatportlet_INSTANCE_Fpb4__facesViewId=%2Fxhtml%2FportletViewMode.xhtml&p_auth=nFDd6uMq&p_p_col_count=1&p_p_col_id=column-1&p_p_id=1_WAR_icefaces2xcompatportlet_INSTANCE_Fpb4&p_p_lifecycle=1&p_p_mode=view&p_p_state=normal">
<input type="hidden" value="v31jf08" name="v31jf08">
<input type="hidden" value="http://localhost:8080/web/guest/ice2?p_p_cacheability=cacheLevelPage&p_p_col_count=1&p_p_col_id=column-1&p_p_id=1_WAR_icefaces2xcompatportlet_INSTANCE_Fpb4&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal" name="javax.faces.encodedURL">
<span id="v31jf08hdnFldsDiv">
<input type="hidden" name="1360817547:f2:j_idcl">
<input type="hidden" name="1360817547:f2:j_id1360817547:f2:dateOfBirthsp">
</span>
<input type="hidden" autocomplete="off" value="-5481536192991678120:-511719377066662166" id="javax.faces.ViewState" name="javax.faces.ViewState">
</form>
But after typing "32801" in the PostalCode field, the DOM-replacement is this:
<form action="http://localhost:8080/web/guest/ice2?_1_WAR_icefaces2xcompatportlet_INSTANCE_Fpb4__facesViewId=%2Fxhtml%2FportletViewMode.xhtml&p_auth=nFDd6uMq&p_p_col_count=1&p_p_col_id=column-1&p_p_id=1_WAR_icefaces2xcompatportlet_INSTANCE_Fpb4&p_p_lifecycle=1&p_p_mode=view&p_p_state=normal" id="v31jf08" method="post" name="v31jf08">
<input name="v31jf08" type="hidden" value="v31jf08" />
<input name="javax.faces.encodedURL" type="hidden" value="http://localhost:8080/web/guest/ice2?p_p_cacheability=cacheLevelPage&p_p_col_count=1&p_p_col_id=column-1&p_p_id=1_WAR_icefaces2xcompatportlet_INSTANCE_Fpb4&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal" />
<input autocomplete="off" id="javax.faces.ViewState" name="javax.faces.ViewState" type="hidden" value="-5481536192991678120:-511719377066662166" />
<span id="v31jf08hdnFldsDiv">
<input name="1360817547:f2:j_idcl" type="hidden" />
<input name="1360817547:f2:j_id1360817547:f2:dateOfBirthsp" type="hidden" />
</span>
</form>
Even though the form is essentially the same, the order of elements, and the order of attributes on elements is different. This is causing a DOM-diff of the form and an unnecessary incremental page update.
-
Hide
- icefaces-2.x-compat-portlet-1.0.0-SNAPSHOT.war
- 7.84 MB
- Neil Griffin
-
- META-INF/MANIFEST.MF 0.1 kB
- css/icefaces-theme-override.css 0.3 kB
- css/liferay-theme-override.css 0.2 kB
- images/icon-help.png 4 kB
- META-INF/context.xml 0.1 kB
- META-INF/LICENSE-2.0.txt 11 kB
- resources/pcc/message.xhtml 1 kB
- resources/pcc/messages.xhtml 1 kB
- WEB-INF/classes/i18n.properties 0.8 kB
- WEB-INF/classes/i18nFaces.properties 0.1 kB
- WEB-INF/classes/log4j.properties 1 kB
- WEB-INF/.../ApplicantBackingBean.class 6 kB
- WEB-INF/classes/.../ApplicantModelBean.class 4 kB
- WEB-INF/classes/.../bean/ListModelBean.class 4 kB
- WEB-INF/classes/org/.../dto/City.class 1 kB
- WEB-INF/classes/org/.../dto/Province.class 0.9 kB
- WEB-INF/classes/.../DebugPhaseListener.class 1 kB
- WEB-INF/classes/.../FacesMessageUtil.class 3 kB
- WEB-INF/faces-config.xml 1 kB
- WEB-INF/lib/commons-beanutils-1.8.0.jar 226 kB
- WEB-INF/lib/commons-collections-3.2.jar 558 kB
- WEB-INF/lib/commons-digester-1.8.jar 140 kB
- WEB-INF/lib/commons-fileupload-1.2.1.jar 56 kB
- WEB-INF/lib/commons-logging-1.1.jar 52 kB
- WEB-INF/lib/icefaces-2.0-Beta2.jar 143 kB
- WEB-INF/.../icefaces-compat-2.0-Beta2.jar 2.55 MB
- WEB-INF/lib/jboss-el-2.0.0.GA.jar 131 kB
- WEB-INF/lib/jsf-api-2.0.jar 575 kB
- WEB-INF/lib/jsf-impl-2.0.3-FCS.jar 1.78 MB
- WEB-INF/lib/jsf-impl-2.0.4-b01.jar 1.79 MB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Ya I noticed that last night. This is due to the ICEfaces 2.0 POM requiring 2.0.3-FCS and the bridge POM requiring 2.0.4-b01. This should be resolved when we sync up on the next release of Mojarra by Oracle.
The multiple JSF .jars do not appear to be the source of the problem.
BridgeSetup.java adds a form to the page for retrieveUpdateSetup. ExtrasSetup.java adds *hdnFieldsDiv to all forms. The interaction between these two SystemEventListeners appears to behave differently during initial page view and ajax updates, resulting in different placement of javax.faces.ViewState.
Since this DOM update does not affect a visible form, it is likely harmless (from the user's point of view), but inefficient.
Assigning to Mircea to fix for 2.0 (not essential for beta2). Neil, please let us know if this fix is actually critical for Portlet support and we can re-prioritize for beta2.
The issue is not essential, not critical for portlet support. It is indeed harmless (from the user's point of view). The inefficiency only happens on the first paritalSubmit, and not thereafter.
Removed code that was rendering ViewState input hidden field during postback. This stops ICEfaces from generating an update for the parent 'form' element. In case the form is updated the ViewState input element is restored by the bridge (see ICE-5691 ).
It looks like the cause of the diff is the javax.faces.ViewState moving within the form. I will reproduce and investigate.