Options
All
  • Public
  • Public/Protected
  • All
Menu

The top level global namespace for JavaServer Faces functionality.

Please note that this functionality may only be available when you use certain tags such as <f:ajax .../> tags.

Index

Variables

implversion: number

An integer specifying the implementation version that this file implements. It's a monotonically increasing number, reset with every increment of jsf.specversion This number is implementation dependent.

separatorchar: string

The result of calling UINamingContainer.getNamingContainerSeparatorChar(): Used for separating IDs, such as a colon (:).

specversion: number

An integer specifying the specification version that this file implements. It's format is: rightmost two digits, bug release number, next two digits, minor release number, leftmost digits, major release number. This number may only be incremented by a new release of the specification.

Functions

  • getClientWindow(node?: string | HTMLElement): string | null
  • Return the windowId of the window in which the argument form is rendered.

    throws

    An error if more than one unique WindowId is found.

    Parameters

    • Optional node: string | HTMLElement

      Determine the nature of the argument. If not present, search for the windowId within document.forms. If present and the value is a string, assume the string is a DOM id and get the element with that id and start the search from there. If present and the value is a DOM element, start the search from there.

    Returns string | null

    The windowId of the current window, or null if the windowId cannot be determined.

  • getProjectStage(): string
  • Return the value of Application.getProjectStage() for the currently running application instance. Calling this method must not cause any network transaction to happen to the server.

    Usage:

    var stage = jsf.getProjectStage();
    if (stage === ProjectStage.Development) {
    // ...
    } else if stage === ProjectStage.Production) {
    // ...
    }

    Returns string

    A string representing the current state of the running application in a typical product development life cycle. Refer to javax.faces.application.Application.getProjectStage and javax.faces.application.ProjectStage.

  • getViewState(form: HTMLFormElement): string
  • Collect and encode state for input controls associated with the specified form element. This will include all input controls of type hidden.

    Usage:

    var state = jsf.getViewState(form);
    

    Parameters

    • form: HTMLFormElement

      The form element whose contained input controls will be collected and encoded. Only successful controls will be collected and encoded in accordance with: Section 17.13.2 of the HTML Specification.

    Returns string

    The encoded state for the specified form's input controls.

Generated using TypeDoc