Affects Version/s: 2.1.7
Fix Version/s: None
I'm creating this as a JIRA issue so that I can attach a test case. However it behaves the same on Mojarra as on MyFaces so possibly it is 'by design'?
My question is this:
- If I dynamically create UIComponents using Application.createComponent, I find they automatically add any dependent resources (JS/CSS) to the h:head. This is fantastic.
- If I dynamically create ClientBehaviours using Application.createBehavior, no dependent resources get added.
Am I supposed to add such resources manually? For example:
UIOutput js = new UIOutput();
FacesContext context = FacesContext.getCurrentInstance();
context.getViewRoot().addComponentResource(context, js, "head");