Global objects and functions (JavaScript™)
Global objects provide entry points to server-side scripts. Entering the name of a global object instantiates it.
Global objects
The following table lists the global objects.
Global object name | Description |
---|---|
applicationScope (JavaScript) |
A com.sun.faces.context.ApplicationMap object
that allows you to share values across pages for the duration of an
application. |
context |
An XSPContext object that provides
access to the database server, the user browser, and other objects. |
cookie |
A com.sun.faces.context.RequestCookieMap object
that provides an immutable map of the cookie values for the current
request, keyed by cookie name. |
currentDocument |
A NotesXspDocument object that
represents the closest document in the current context. |
database |
A
com.ibm.domino.xsp.module.nsf.NSFComponentModule$XPagesDatabase object that
represents the HCL Domino® database currently being used as
a data source. |
document1 , document2 ,
and so on |
A NotesXspDocument object that
represents a Domino® document
data source. These are default names which you may have changed. Use currentDocument to
access the current data source. |
facesContext |
A com.ibm.xsp.domino.context.DominoFacesContext object
that represents the faces context instance for the current request. |
header |
A com.sun.faces.context.RequestHeaderMap object
that provides an immutable map of HTTP header values for the current
request, keyed by header name. Only the first value for each header
name is included. |
headerValues |
A com.sun.faces.context.RequestHeaderValuesMap object
that provides an immutable map of String arrays containing all of
the header values for HTTP headers in the current request, keyed by
header name. |
initParam |
A com.sun.faces.context.InitParameterMap object
that provides an immutable map of the context initialization parameters
for this web application. |
param |
A com.sun.faces.context.RequestParameterMap object
that provides an immutable map of the request parameters for this
request, keyed by parameter name. Only the first value for each parameter
name is included. |
paramValues |
An com.sun.faces.context.RequestParameterValuesMap object
that provides an immutable map of String arrays containing all of
the parameter values for request parameters in the current request,
keyed by parameter name. |
requestScope (JavaScript) |
A com.sun.faces.context.RequestMap object
that allows you to share values across pages for the duration of a
request. |
session |
A lotus.domino.local.Session object
that represents the current Domino® session
with credentials based on the user. |
sessionAsSigner |
A lotus.domino.local.Session object
that represents the current Domino® session
with credentials based on the XPage signer. |
sessionAsSignerWithFullAccess |
A lotus.domino.local.Session object
that represents the current Domino® session
with credentials based on the XPage signer with full access. |
sessionScope (JavaScript) |
A com.sun.faces.context.SessionMap object
that allows you to share values across pages for the duration of a
session. |
view |
A com.ibm.xsp.component.UIViewRootEx2 object
that represents the UI view root of the current component tree. |
view1 , view2 ,
and so on |
A lotus.domino.local.View object
that represents a Domino® view
data source. Names are user assigned and may differ. |
viewScope |
A javax.faces.component.UIViewRoot$ViewMap object
that allows you to share values across a view. |
Global functions
Global
functions can be called directly from server-side scripts. The following
table lists the global functions.
Global function name | Description |
---|---|
getClientId(id:string) : string |
Gets a client-side identifier for a UI component. |
getComponent (Global objects and functions - JavaScript)(id:string) : javax.faces.component.UIComponent |
Gets the base object for a UI component. |
getForm() : javax.faces.component.UIForm |
Gets the form presented to the user. |
getLabelFor (Global objects and functions - JavaScript)(component:javax.faces.component.UIComponent)
: javax.faces.component.UIComponent |
Gets the base object for the label associated with a UI component. |
getView() : javax.faces.component.UIViewRoot |
Gets the root of the component tree. |
save() : void |
Saves the current state. |
This documentation refers to the following products: HCL Domino®, HCL Domino® Designer, HCL Notes®, HCL iNotes®, and HCL Traveler.