Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.2.0.BETA
-
Fix Version/s: EE-3.2.0.GA
-
Component/s: Framework
-
Labels:None
-
Environment:MyFaces
-
Assignee Priority:P1
Description
When trying to run the showcase application with MyFaces instead of Mojarra, I ran into a problem where numerous JavaScript exceptions were thrown by the client. It seems to be related to ResourceOrdering.
It looks like all the requisite files are being loaded so I thought it might be a question of the order. When I put some debugging in the ResourceOrdering class I saw that the ordered resources were being processed the same way:
MyFaces
ResourceOrdering.orderResources: head facet is called head
ResourceOrdering.orderResources: resource container org.apache.myfaces.component.ComponentResourceContainer@22c9af86
ResourceOrdering.orderResources: added themes/sam/theme.css as a defined resource
ResourceOrdering.orderResources: added jsf.js as a defined resource
ResourceOrdering.orderResources: added util/ace-yui.js as a defined resource
ResourceOrdering.orderResources: added util/combined.css as a defined resource
ResourceOrdering.orderResources: added util/ace-jquery.js as a defined resource
etc...
Mojarra
ResourceOrdering.orderResources: head facet is called javax_faces_location_HEAD
ResourceOrdering.orderResources: resource container com.sun.faces.component.ComponentResourceContainer@5bbe1466
ResourceOrdering.orderResources: added themes/sam/theme.css as a defined resource
ResourceOrdering.orderResources: added jsf.js as a defined resource
ResourceOrdering.orderResources: added util/ace-yui.js as a defined resource
ResourceOrdering.orderResources: added util/combined.css as a defined resource
ResourceOrdering.orderResources: added util/ace-jquery.js as a defined resource
etc…
But when I looked at the final rendered output, the Mojarra markup matches the order we added the resources but the MyFaces code does not - it's in some other unpredictable order. So it seems that the ResourceOrdering strategy is not working the same way with MyFaces. - that is, the underlying collection/list/set/map is not honouring the order that we're adding the resources back in (or something to that effect).
It looks like all the requisite files are being loaded so I thought it might be a question of the order. When I put some debugging in the ResourceOrdering class I saw that the ordered resources were being processed the same way:
MyFaces
ResourceOrdering.orderResources: head facet is called head
ResourceOrdering.orderResources: resource container org.apache.myfaces.component.ComponentResourceContainer@22c9af86
ResourceOrdering.orderResources: added themes/sam/theme.css as a defined resource
ResourceOrdering.orderResources: added jsf.js as a defined resource
ResourceOrdering.orderResources: added util/ace-yui.js as a defined resource
ResourceOrdering.orderResources: added util/combined.css as a defined resource
ResourceOrdering.orderResources: added util/ace-jquery.js as a defined resource
etc...
Mojarra
ResourceOrdering.orderResources: head facet is called javax_faces_location_HEAD
ResourceOrdering.orderResources: resource container com.sun.faces.component.ComponentResourceContainer@5bbe1466
ResourceOrdering.orderResources: added themes/sam/theme.css as a defined resource
ResourceOrdering.orderResources: added jsf.js as a defined resource
ResourceOrdering.orderResources: added util/ace-yui.js as a defined resource
ResourceOrdering.orderResources: added util/combined.css as a defined resource
ResourceOrdering.orderResources: added util/ace-jquery.js as a defined resource
etc…
But when I looked at the final rendered output, the Mojarra markup matches the order we added the resources but the MyFaces code does not - it's in some other unpredictable order. So it seems that the ResourceOrdering strategy is not working the same way with MyFaces. - that is, the underlying collection/list/set/map is not honouring the order that we're adding the resources back in (or something to that effect).
Activity
Deryk Sinotte
created issue -
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | EE-3.2.0.GA [ 10332 ] | |
Assignee | Mircea Toma [ mircea.toma ] |
Deryk Sinotte
made changes -
Attachment | myfaces-script-problems.png [ 15295 ] |
Deryk Sinotte
made changes -
Assignee Priority | P1 [ 10010 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #32963 | Fri Jan 04 16:03:28 MST 2013 | mircea.toma | |
Files Changed | ||||
MODIFY
/icefaces3/trunk/icefaces/compat/core/src/main/resources/META-INF/resource-dependency.xml
MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/resource-dependency.xml MODIFY /icefaces3/trunk/icefaces/core/src/main/resources/META-INF/resource-dependency.xml MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/datetimeentry/datetimeentry.js |
Mircea Toma
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #32965 | Sun Jan 06 11:37:01 MST 2013 | mircea.toma | |
Files Changed | ||||
MODIFY
/icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/datetimeentry/datetimeentry.js
|
Carmen Cristurean
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Carmen Cristurean
made changes -
Attachment | ICE-7019-JSerror.png [ 15317 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #32986 | Tue Jan 08 11:17:03 MST 2013 | mircea.toma | |
Files Changed | ||||
MODIFY
/icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/resources/META-INF/resource-dependency.xml MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/application/ExtrasSetup.java MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/ResourceOrdering.java |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #32988 | Tue Jan 08 11:42:11 MST 2013 | mircea.toma | |
Files Changed | ||||
MODIFY
/icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapResourceHandler.java
|
Mircea Toma
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Ken Fyten
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
To help verify that ResourceOrdering is the issue, I tweaked the code so that, when running MyFaces, we skip any processing of jsf.js and this appeared to allow the script resources to load and evaluate more normally.
if( EnvUtils.isMyFaces() && name != null && name.startsWith("jsf."))
{ //MyFaces doesn't seem to like it if we add and remove the jsf. }else{
{ root.removeComponentResource(context, next, target); orderedChildren.add(next); }if (resourceEntry.name.equals(name) && resourceEntry.library.equals(library))
}
However, since this isn't likely to be a "real" fix, I'll turn this over to Mircea to have a look.