Package org.primefaces
Class PrimeFaces
java.lang.Object
org.primefaces.PrimeFaces
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
class
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Protected constructor to allow CDI proxying - and also allow customizations, or setting a mock. -
Method Summary
Modifier and TypeMethodDescriptionajax()
static PrimeFaces
current()
dialog()
Returns the dialog helpers.void
executeInitScript
(String statement) Executes a JavaScript statement before all other PrimeFaces scripts are executed.void
executeScript
(String statement) Executes a JavaScript statement.void
Resolves the search expression, starting from the viewroot, and focus the resolved component.void
Resolves the search expression and focus the resolved component.protected javax.faces.context.FacesContext
protected PrimeRequestContext
boolean
Shortcut forPartialViewContext.isAjaxRequest()
.boolean
Checks if the current request is a Faces request.Returns the MultiViewState helpers.void
resetInputs
(String... expressions) Resolves the search expressions, starting from the viewroot and resets all foundUIInput
components.void
resetInputs
(Collection<String> expressions) Resolves the search expressions, starting from the viewroot and resets all foundUIInput
components.void
Scrolls to a component with the given clientId.static void
setCurrent
(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:
true
if the current request is a Faces request.
-
isAjaxRequest
public boolean isAjaxRequest()Shortcut forPartialViewContext.isAjaxRequest()
.- Returns:
true
if 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 foundUIInput
components.- Parameters:
expressions
- a list of search expressions.
-
resetInputs
Resolves the search expressions, starting from the viewroot and resets all foundUIInput
components.- 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.
-