• Public
  • Public/Protected
  • All

The object with functionality related to handling resources on the server, such as CSS and JavaScript files.



  • getFacesResource(name: string, library: string, version: string): string
  • Builds a JSF resource URL for given resource.

    getFacesResource("main.css", "pf", "4.2.0") // => "https://www.primefaces.org/showcase/javax.faces.resource/main.css.xhtml?ln=pf&v=4.2.0"


    • name: string

      The name of the resource, such as primefaces.js.

    • library: string

      The library of the resource, such as primefaces.

    • version: string

      The version of the library, such as 5.1.

    Returns string

    The JSF resource URL for loading the resource.

  • getResourceScriptName(scriptURI: string): string
  • Given a URI, find the name of the script, such as primefaces-extensions.js.


    • scriptURI: string

      The URI of a script

    Returns string

    The name of the script.

  • getResourceScriptURI(): string
  • Gets the resource URI of the first Javascript JS file served as a JSF resource.

    Returns string

    The first JavasScript resource URI.

  • getResourceUrlExtension(): string
  • Finds the URL extension of currently included resources, such as jsf or xhtml.

    This should only be used if extensions mapping is used, see PrimeFaces.isExtensionMapping.

    Returns string

    The URL extension.

  • isExtensionMapping(): boolean
  • Checks if the FacesServlet is mapped with an extension mapping. Common extension mapping are for example:

    • .jsf
    • .xhtml

    Returns boolean

    true if the FacesServlet is mapped with an extension mapping, false otherwise.

Generated using TypeDoc