Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-372

cannot use AddResource class to add resources of own components

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.2
    • 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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebcsaba Csaba Sebastian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: