Package org.primefaces
Class PrimeFaces
java.lang.Object
org.primefaces.PrimeFaces
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclass -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor to allow CDI proxying - and also allow customizations, or setting a mock. -
Method Summary
Modifier and TypeMethodDescriptionajax()static PrimeFacescurrent()dialog()Returns the dialog helpers.voidexecuteInitScript(String statement) Executes a JavaScript statement before all other PrimeFaces scripts are executed.voidexecuteScript(String statement) Executes a JavaScript statement.voidResolves the search expression, starting from the viewroot, and focus the resolved component.voidResolves the search expression and focus the resolved component.protected javax.faces.context.FacesContextprotected PrimeRequestContextbooleanShortcut forPartialViewContext.isAjaxRequest().booleanChecks if the current request is a Faces request.Returns the MultiViewState helpers.voidresetInputs(String... expressions) Resolves the search expressions, starting from the viewroot and resets all foundUIInputcomponents.voidresetInputs(Collection<String> expressions) Resolves the search expressions, starting from the viewroot and resets all foundUIInputcomponents.voidScrolls to a component with the given clientId.static voidsetCurrent(PrimeFaces primeFaces)
-
Constructor Details
-
PrimeFaces
protected PrimeFaces()Protected constructor to allow CDI proxying - and also allow customizations, or setting a mock.
-
-
Method Details
-
current
-
setCurrent
-
getFacesContext
protected javax.faces.context.FacesContext getFacesContext() -
getRequestContext
-
isFacesRequest
public boolean isFacesRequest()Checks if the current request is a Faces request.- Returns:
trueif the current request is a Faces request.
-
isAjaxRequest
public boolean isAjaxRequest()Shortcut forPartialViewContext.isAjaxRequest().- Returns:
trueif the current request is a AJAX request.
-
executeInitScript
Executes a JavaScript statement before all other PrimeFaces scripts are executed. Useful when you need to do some initialization.- Parameters:
statement- the JavaScript statement.
-
executeScript
Executes a JavaScript statement.- Parameters:
statement- the JavaScript statement.
-
scrollTo
Scrolls to a component with the given clientId.- Parameters:
clientId- clientId of the target component.
-
focus
Resolves the search expression, starting from the viewroot, and focus the resolved component.- Parameters:
expression- The search expression.
-
focus
Resolves the search expression and focus the resolved component.- Parameters:
expression- the search expression.base- the base component from which we will start to resolve the search expression.
-
resetInputs
Resolves the search expressions, starting from the viewroot and resets all foundUIInputcomponents.- Parameters:
expressions- a list of search expressions.
-
resetInputs
Resolves the search expressions, starting from the viewroot and resets all foundUIInputcomponents.- Parameters:
expressions- a list of search expressions.
-
dialog
Returns the dialog helpers.- Returns:
- the dialog helpers.
-
ajax
-
multiViewState
Returns the MultiViewState helpers.- Returns:
- the MultiViewState helpers.
-