Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta2
-
Component/s: Framework, ICE-Components
-
Labels:None
-
Environment:icefaces2, ace
Description
With AJAX, there are problems when modifying the <head>, that necessitate techniques to avoid doing so. With ICE-6047, we solved an issue where a postback could cause an ice:gmap component to become rendered, and in doing so, modify the head, as its javascript resources become added to the head. The solution for that was to recognise when the ice:gmap component was in a JAR in the WAR, and thus had the potential for being in the application, then, via a config param, allow for its resources to always be in the head. This was done by annotating the GMapRenderer, so it's self-describing, and there's no central list of components being reflectively sought.
Now, consider the ace components, which each have many resource dependencies, which would modify the head if the components were dynamically ui:included, or their rendered property were toggled. So, we want to annotate them so that when the ACE JAR is in the WAR, their @ResourceDependency annotations will always be processed, whether they're in the view yet or not.
Now, consider the ace components, which each have many resource dependencies, which would modify the head if the components were dynamically ui:included, or their rendered property were toggled. So, we want to annotate them so that when the ACE JAR is in the WAR, their @ResourceDependency annotations will always be processed, whether they're in the view yet or not.
Activity
Mark Collette
created issue -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #22825 | Sun Oct 24 22:58:41 MDT 2010 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/render/ExternalScript.java
MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/render/MandatoryResourceComponent.java MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java |
Mark Collette
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 2.0-Beta2 [ 10242 ] | |
Assignee | Mark Collette [ mark.collette ] |
Mark Collette
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Security | Private [ 10001 ] |
Ken Fyten
made changes -
Fix Version/s | 2.0.0 [ 10230 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Added processing in DOMRenderKit to scan for new MandatoryResourceComponent annotation on Renderer objects. If they're found, add the component class name from the annotation to a list, which BridgeSetup retrieves on each lifecycle.
Original strategy was to instantiate a dummy instance of each component, and temporarily add it into the component tree, hoping that would trigger its @ResourceDependency / @ResourceDependencies processing, so the internal JSF mechanisms would handle the resource adding. This didn't work. I didn't really have time to investigate why. So, I fell back to Plan B, which was to process the @ResourceDependency / @ResourceDependencies annotations right in BridgeSetup. Found out that our code had to handle the case where the target is null, and needs to be defaulted to "head". Also found a way to get JSF to automatically handle javascript and CSS files, without us having to parse that out ourselves. Finally, added redundancy culling, so that all the redundant resources, which multiple components require, will only be added once.
Subversion 22825