jakartaee / faces

Jakarta Faces
Other
106 stars 55 forks source link

Dynamically created ClientBehaviors do not call addComponentResource #1162

Open eclipse-faces-bot opened 11 years ago

eclipse-faces-bot commented 11 years ago

Am I supposed to add such resources manually? For example:

UIOutput js = new UIOutput(); js.setRendererType("javax.faces.resource.Script"); js.getAttributes().put("library", "mylibrary"); js.getAttributes().put("name", "bar.js");

FacesContext context = FacesContext.getCurrentInstance(); context.getViewRoot().addComponentResource(context, js, "head");

If so, how am I supposed to know what they are? For example, if I am dynamically adding an AjaxBehavior the exact name of the JavaScript file depends on which JSF implementation I am using.

Also logged as https://issues.apache.org/jira/browse/MYFACES-3610 (but got no response, so I'm trying it as a spec issue)

Environment

Both Mojarra and MyFaces 2.1.x implementations behave the same

Affected Versions

[2.1]

eclipse-faces-bot commented 5 years ago
eclipse-faces-bot commented 11 years ago

@glassfishrobot Commented Reported by kennardconsulting

eclipse-faces-bot commented 11 years ago

@glassfishrobot Commented kennardconsulting said: The MyFaces team have indicated this may be a bug in the spec:

"the reason it does not work is because javax.faces.component.behavior.AjaxBehavior does not have @ResourceDependency attached" https://issues.apache.org/jira/browse/MYFACES-3610

Could you please discuss?

eclipse-faces-bot commented 11 years ago

@glassfishrobot Commented kennardconsulting said: I checked javax.faces.component.behavior.AjaxBehaviour.java in the latest 2.2 snapshot...

https://maven.java.net/content/repositories/snapshots/javax/faces/javax.faces-api/2.2-SNAPSHOT/javax.faces-api-2.2-20130207.091549-141-sources.jar

...and it doesn't appear to be annotated there either?

eclipse-faces-bot commented 10 years ago

@glassfishrobot Commented @edburns said: Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

eclipse-faces-bot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1162