Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 4.1.1
-
Fix Version/s: 4.1.1
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Apache Pluto
-
Assignee Priority:P1
Description
- Username: pluto
- Password: pluto
- Copy the attached icefaces4-portlet-4.0.0-SNAPSHOT.war artifact to the tomcat/webapps folder
- Using the Pluto Admin page, add a new page named "ICE4" and then add the "ICEfaces4" portlet to it.
- Navigate to the new ICE4 page
- Click in the "Date of Birth" field at try to select a date from the popup calendar
If the bug is fixed then the date will be selected and appear in the textbox.
Otherwise, if the bug still exists then there will be an error in the browser's console log:
Uncaught TypeError: Cannot read property 'length' of undefined
http://localhost:8080/pluto/portal/ICE4/__rsicefaces4-portlet-40x200x20-SNAPSHOT0x21!2241321%7C0?ln=ice.core&javax.faces.resource=bridge.js
-
Hide
- icefaces4-portlet-4.0.0-SNAPSHOT.war
- 11.54 MB
- Neil Griffin
-
- META-INF/MANIFEST.MF 0.3 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/.../ApplicantBackingBean.class 9 kB
- WEB-INF/classes/.../ApplicantModelBean.class 4 kB
- WEB-INF/classes/.../ApplicantViewBean.class 1 kB
- WEB-INF/classes/.../bean/ListModelBean.class 5 kB
- WEB-INF/.../PortletPreferencesBackingBean.class 4 kB
- WEB-INF/classes/com/.../demos/dto/City.class 1 kB
- WEB-INF/classes/com/.../dto/Province.class 0.9 kB
- WEB-INF/.../UploadedFileWrapper.class 5 kB
- WEB-INF/classes/i18n.properties 1 kB
- WEB-INF/classes/i18nFaces.properties 0.1 kB
- WEB-INF/classes/log4j.properties 2 kB
- WEB-INF/classes/META-INF/apache-2.0.txt 11 kB
- WEB-INF/classes/.../cddl-1.0-gpl-2.0-cp.txt 44 kB
- WEB-INF/classes/META-INF/cddl-1.0.txt 16 kB
- WEB-INF/classes/META-INF/NOTICE.txt 0.6 kB
- WEB-INF/classes/META-INF/THIRD-PARTY.txt 0.7 kB
- WEB-INF/faces-config.xml 0.9 kB
- WEB-INF/lib/commons-logging-1.1.1.jar 59 kB
- WEB-INF/.../icefaces-4.1.1-20160216.170212-3.jar 684 kB
- WEB-INF/.../icefaces-ace-4.1.1-20160216.171751-3.jar 6.07 MB
- WEB-INF/lib/jsf-api-2.2.13.jar 680 kB
- WEB-INF/lib/jsf-impl-2.2.13.jar 2.30 MB
- WEB-INF/.../liferay-faces-alloy-3.0.0-SNAPSHOT.jar 573 kB
- WEB-INF/.../liferay-faces-bridge-api-4.0.0-SNAPSHOT.jar 94 kB
- WEB-INF/.../liferay-faces-bridge-impl-4.0.0-SNAPSHOT.jar 451 kB
- WEB-INF/.../liferay-faces-util-3.0.0-SNAPSHOT.jar 276 kB
- WEB-INF/lib/log4j-1.2.14.jar 359 kB
- WEB-INF/portlet.xml 2 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
After being able to test the portlet, this seems to be a more general issue with the bridge. The same javascript error occurs when entering text in the other text fields in the form, such as 'First Name', and then tabbing out.
I traced the error, and it occurs at the fixAlreadyNamespacedOptions() function, called from the fullSubmit() function. The error occurs when trying to get the length of the 'parameterPrefix' argument, which is undefined on Pluto, whereas, on Liferay, it's an empty string.
Perhaps, this could be fixed by modifying the first line of fixAlreadyNamespacedOptions() from...
var length = parameterPrefix.length;
to...
var length = parameterPrefix ? parameterPrefix.length : 0;
...or maybe this new line should be inserted first, since parameterPrefix is used later on
parameterPrefix = typeof parameterPrefix != 'undefined' ? parameterPrefix : '';
The javascript error is not the real problem. In the page markup the inline script responsible for setting up the ICEfaces bridge is not rendered. The 'parameterPrefix' is one of the parameter that is defined in setup configuration.
The following element should have an inline script element as child:
<span id="Pluto_icefaces4_portlet_4_0_0_SNAPSHOT_1_3556498_0_:vv80fgyh1_icefaces_config"></span>
When you get an opportunity, please let me know what part of the ICEfaces source code is responsible for rendering the <span>...</span> you mentioned.
org.icefaces.impl.event.BridgeSetup class, line 157.
Are you saying that the script is getting rendered in Liferay Portal but not in Pluto?
No, Liferay will not render the script tag. But at least it renders its content in a different place:
<div id="bottomJS"> ..... </div> <script type="text/javascript"> .....ice.setupBridge("_1_WAR_icefaces4portlet_INSTANCE_vV75ldMObRSc_:vv20q4nh4_icefaces_config","v20q4nh4","jdiky5fkvu",{reloadOnUpdateFailure:!1,deltaSubmit:!1,focusManaged:!0,disableDefaultErrorPopups:!1,standardFormSerialization:!1,sendDisposeWindow:!1,blockUIOnSubmit:!1,clientSideElementUpdateDetermination:!1,parameterPrefix:""}); ....... </script>
Is it OK that it Liferay renders it at the bottom of the page? That is a Liferay-only optimization that we have in the bridge. If it is not rendered at all in Pluto, then that means we have a bug in the bridge and this issue can be closed.
Yes, it's fine if the script is rendered at the bottom of the page. I'll close the issue then.
This is not an issue with ICEfaces. See above.
This issue is a bug in Liferay Faces. We have created FACES-2615 to track the issue, and I hope to commit a fix today.
I haven't been able to successfully deploy the attached portlet on Apache Pluto 2.0.2. I'm able to add the portlet to a page, but when I try to view the page I get this exception, displayed right on the browser:
I tried to simplify the portlet to make it only display the dateTimeEntry component, but I keep getting the same exception.
I followed the steps exactly as they appear in the description. Am I missing a step or do I need to add a library or something else to Pluto?