A search expression consists of either an identifier (which is matched exactly against the id
property of a UIComponent, or a keyword (like @this or @form), or a series of such
identifiers and keywords linked by the jakarta. character
value. See SearchKeywordResolver for the list of supported keywords. The search algorithm must operate as
follows, though alternate alogrithms may be used as long as the end result is the same:
UIComponent that will be the base for searching:
jakarta.faces.component.UIViewRoot . The leading separator character will be stripped off, and the
remainder of the search expression will be treated as a "relative" search expression as described below.SearchExpressionContext#getSource() will be used.jakarta.faces.component.UINamingContainer#getSeparatorChar into
"commands". The commands will be resolved one by one. For the first command, the source component, like mentioned
above, will be used to start the lookup. For all further commands, the previous resolved component, from the previous
command, will be used the start the lookup.KEYWORD_PREFIX, then it is considered as a keyword and the
SearchKeywordResolvers will be used the resolve the keyword.KEYWORD_PREFIX, then the component will be resolved based
on the component ID.| Modifier and Type | Field and Description |
|---|---|
| protected static final char[] | EXPRESSION_SEPARATOR_CHARS
The default characters used to separate expressions in a series of expressions. |
| public static final String | KEYWORD_PREFIX
The prefix to identify a keyword. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public char[] | Returns: the separator charsthe context)FacesContext for the current requestReturn the characters used to separate expressions in a series of expressions. |
| public void | invokeOnComponent(SearchExpressionContext searchExpressionContext, String
the search expression expression, ContextCallback the callback for the resolved component callback)
Resolves multiple |
| public abstract void | invokeOnComponent(SearchExpressionContext searchExpressionContext, UIComponent
The previous resolved component, that will be the base for searching previous, String the search expression expression, ContextCallback the callback for the resolved component callback)
Resolves multiple |
| public abstract boolean | Returns: If the given expression is a passtrough expressionthe expression expression)Checks if the given expression is a "passtrough expression". |
| public abstract boolean | Returns: If the given expression is a valid expressionthe expression expression)Checks if the given expression is a valid expression. |
| public abstract String | Returns: The resolved clientId or passtrough expression. If the expression can not be resolved and ifSearchExpressionHint#IGNORE_NO_RESULT was passed, null will be returned.the search expression expression)Resolves to a single clientId or passthrough expression for the given expression. |
| public abstract List | Returns: The resolved clientIds and passtrough expressions.the search expressions expressions)
Resolves to a |
| public abstract void | resolveComponent(SearchExpressionContext searchExpressionContext, String
the search expression expression, ContextCallback the callback for the resolved component callback)
Resolves a single |
| public abstract void | resolveComponents(SearchExpressionContext searchExpressionContext, String
the search expression(s) expressions, ContextCallback the callback for each resolved component callback)
Resolves multiple |
| public abstract String[] | Returns: the expression(s) as arraythe context, String FacesContext for the current requestThe expressions as string expressions)
Splits an string, based on |
| EXPRESSION_SEPARATOR_CHARS | back to summary |
|---|---|
| protected static final char[] EXPRESSION_SEPARATOR_CHARS The default characters used to separate expressions in a series of expressions. Expressions are per default separated by space and comma.
| |
| KEYWORD_PREFIX | back to summary |
|---|---|
| public static final String KEYWORD_PREFIX The prefix to identify a keyword.
| |
| SearchExpressionHandler | back to summary |
|---|---|
| public SearchExpressionHandler() | |
| getExpressionSeperatorChars | back to summary |
|---|---|
| public char[] getExpressionSeperatorChars(FacesContext context)
Return the characters used to separate expressions in a series of expressions. The default implementation returns
| |
| invokeOnComponent | back to summary |
|---|---|
| public void invokeOnComponent(SearchExpressionContext searchExpressionContext, String expression, ContextCallback callback)
Resolves multiple
| |
| invokeOnComponent | back to summary |
|---|---|
| public abstract void invokeOnComponent(SearchExpressionContext searchExpressionContext, UIComponent previous, String expression, ContextCallback callback)
Resolves multiple
| |
| isPassthroughExpression | back to summary |
|---|---|
| public abstract boolean isPassthroughExpression(SearchExpressionContext searchExpressionContext, String expression)
Checks if the given expression is a "passtrough expression". A passthrough expression must only be a keyword. This
keyword will not be resolved by the
| |
| isValidExpression | back to summary |
|---|---|
| public abstract boolean isValidExpression(SearchExpressionContext searchExpressionContext, String expression) Checks if the given expression is a valid expression. A expression is invalid if:
| |
| resolveClientId | back to summary |
|---|---|
| public abstract String resolveClientId(SearchExpressionContext searchExpressionContext, String expression) Resolves to a single clientId or passthrough expression for the given expression.
| |
| resolveClientIds | back to summary |
|---|---|
| public abstract List
Resolves to a
| |
| resolveComponent | back to summary |
|---|---|
| public abstract void resolveComponent(SearchExpressionContext searchExpressionContext, String expression, ContextCallback callback)
Resolves a single
| |
| resolveComponents | back to summary |
|---|---|
| public abstract void resolveComponents(SearchExpressionContext searchExpressionContext, String expressions, ContextCallback callback)
Resolves multiple
| |
| splitExpressions | back to summary |
|---|---|
| public abstract String[] splitExpressions(FacesContext context, String expressions)
Splits an string, based on
| |