Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
I wrote a new component based on MyFaces, and this component has an external JS resource. While rendering, I want to add the reference of this resource by the AddResource class: I tried simply to call AddResource.addJavaScriptToHeader(...). But unfortunately this function can handle only the resources of the MyFaces components, because of the line 203:
if( ! name.startsWith(COMPONENTS_PACKAGE) ){ log.error( ....
If I write my own AddResource class (functions like yours), the ExtensionsFilter still references the old AddReource class (between lines 106 and 132), so I need to implement a new ExtensionFilter to handle my resources well.
This solution of my problem works, but I won't use it. I need a more structured solution. What shall I do to use the original AddResource class? And what are these ?security reasons", why the restriction to the package name is required?