Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Alpha3
-
Fix Version/s: EE-3.2.0.GA, 3.3
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces 2
-
Affects:Documentation (User Guide, Ref. Guide, etc.)
Description
We need a way to declare static javascript and css dependencies in our component metadata.
For example, in org.icefaces.component.slider.Slider we have this method called from the constructor:
private void loadDependency(FacesContext context) {
context.getViewRoot().addComponentResource(context, new UIOutput() {
public void encodeBegin(FacesContext context) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.startElement("script", this);
writer.writeAttribute("type", "text/javascript", null);
writer.writeAttribute("src", "http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js", null);
writer.endElement("script");
}
}, "head");
}
Here we're manually coding a javascript dependency on http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js which could be represented as an annotation on SliderMeta, and then this method could be generated in SliderBase.
Above that, we use the new JSF 2.0 annotations for declaring resources to be served out of our own component JAR:
@ResourceDependencies({
@ResourceDependency(name="util.js",library="org.icefaces.component.util"),
@ResourceDependency(name="yui3.js",library="org.icefaces.component.util"),
@ResourceDependency(name="slider.js",library="org.icefaces.component.slider")
})
Again, it would be nice if we could specify some annotation on SliderMeta, which would then generate this code on SliderBase.
For example, in org.icefaces.component.slider.Slider we have this method called from the constructor:
private void loadDependency(FacesContext context) {
context.getViewRoot().addComponentResource(context, new UIOutput() {
public void encodeBegin(FacesContext context) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.startElement("script", this);
writer.writeAttribute("type", "text/javascript", null);
writer.writeAttribute("src", "http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js", null);
writer.endElement("script");
}
}, "head");
}
Here we're manually coding a javascript dependency on http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js which could be represented as an annotation on SliderMeta, and then this method could be generated in SliderBase.
Above that, we use the new JSF 2.0 annotations for declaring resources to be served out of our own component JAR:
@ResourceDependencies({
@ResourceDependency(name="util.js",library="org.icefaces.component.util"),
@ResourceDependency(name="yui3.js",library="org.icefaces.component.util"),
@ResourceDependency(name="slider.js",library="org.icefaces.component.slider")
})
Again, it would be nice if we could specify some annotation on SliderMeta, which would then generate this code on SliderBase.
Issue Links
- depends on
-
ICE-5698 Sparkle: Establish local copies of required YUI libraries
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Mark Collette
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 2.0-Alpha3 [ 10032 ] | |
Affects | [Documentation (User Guide, Ref. Guide, etc.)] | |
Assignee | Adnan Durrani [ adnan.durrani ] |
Ken Fyten
made changes -
Assignee | Adnan Durrani [ adnan.durrani ] | Mark Collette [ mark.collette ] |
Ken Fyten
made changes -
Summary | Sparkle metadata static resources | Sparkle metadata static resource optimization |
Salesforce Case | [] |
Ken Fyten
made changes -
Fix Version/s | 2.0-Beta [ 10231 ] | |
Fix Version/s | 2.0-Alpha3 [ 10032 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Fix Version/s | 2.0-Beta [ 10231 ] |
Mark Collette
made changes -
Salesforce Case | [] | |
Fix Version/s | 2.0-Beta2 [ 10242 ] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Affects Version/s | 2.0-Alpha3 [ 10032 ] | |
Affects Version/s | 2.0-Alpha2 [ 10214 ] | |
Assignee | Mark Collette [ mark.collette ] | Arturo Zambrano [ artzambrano ] |
Ken Fyten
made changes -
Assignee Priority | P2 |
Ken Fyten
made changes -
Security | Private [ 10001 ] |
Ken Fyten
made changes -
Summary | Sparkle metadata static resource optimization | ACE metadata static resource optimization |
Salesforce Case | [] | |
Component/s | ACE-Components [ 10050 ] | |
Component/s | Components [ 10012 ] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Fix Version/s | 2.0-Beta2 [ 10242 ] | |
Assignee Priority | P2 | |
Security | Private [ 10001 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 2.1 [ 10241 ] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Assignee | Arturo Zambrano [ artzambrano ] |
Ken Fyten
made changes -
Fix Version/s | 3.1 [ 10312 ] | |
Fix Version/s | 3.0 [ 10241 ] |
Ken Fyten
made changes -
Fix Version/s | 3.2 [ 10338 ] | |
Fix Version/s | 3.1 [ 10312 ] |
Ken Fyten
made changes -
Fix Version/s | 3.3 [ 10370 ] | |
Fix Version/s | 3.2 [ 10338 ] |
Ken Fyten
made changes -
Fix Version/s | EE-3.2.0.GA [ 10332 ] | |
Fix Version/s | 3.2 [ 10338 ] | |
Fix Version/s | 3.3 [ 10370 ] |
Ken Fyten
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Mark Collette
made changes -
Fix Version/s | 3.3 [ 10370 ] | |
Fix Version/s | 3.2 [ 10338 ] |
Ken Fyten
made changes -
Security | Private [ 10001 ] |
Ken Fyten
made changes -
Issue Type | New Feature [ 2 ] | Improvement [ 4 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |