A SearchKeywordResolver is responsible for resolving a single keyword. Implementations must support
the following set of SearchKeywordResolver implementations, each with the associated behavior.
| Search Keyword | Behavior |
|---|---|
| @all | All components in the view |
| @child(n) | The nth child of the base component |
| @composite | The composite component parent of the base component |
| @form | The closest form ancestor of the base component |
| @id(id) | Resolves to the components with the specified component id (not clientId). This is useful when the exact location of the component tree is unknown, but must be used with caution when there multiple occurrences of the given id within the view. |
| @namingcontainer | The closest jakarta.faces.component.NamingContainer ancestor component of the base component |
| @next | The next component in the view after the base component |
| @none | No component |
| @parent | The parent of the base component |
| @previous | The previous component to the base component |
| @root | The jakarta.faces.component.UIViewRoot |
| @this | The base component |
New SearchKeywordResolvers can be registered via
jakarta.faces.application.Application#addSearchKeywordResolver(jakarta.faces.component.search.SearchKeywordResolver)
or in the application configuration resources.
<application>
<search-keyword-resolver>...</search-keyword-resolver>
</application>
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if it's leaf keyword.the keyword keyword)A leaf keyword is a keyword that does not allow to be combined with keywords or id chains to the right. |
| public boolean | Returns: true if it's passthrough keyword.the keyword keyword)A passthrough keyword is a keyword, that according to the context, does not require to be resolved on the server, and can be passed "unresolved" to the client. |
| public abstract boolean | Returns: true if it's responsible for resolving this keywordthe keyword keyword)
Checks if the current instance of the |
| public abstract void | resolve(SearchKeywordContext
the searchKeywordContext, UIComponent SearchKeywordContextthe previous resolved component or the source component (if called for the first keyword in the chain) current, String the keyword keyword)
Try to resolve one or multiple |
| SearchKeywordResolver | back to summary |
|---|---|
| public SearchKeywordResolver() | |
| isLeaf | back to summary |
|---|---|
| public boolean isLeaf(SearchExpressionContext searchExpressionContext, String keyword) A leaf keyword is a keyword that does not allow to be combined with keywords or id chains to the right. For example: @none:@parent.
| |
| isPassthrough | back to summary |
|---|---|
| public boolean isPassthrough(SearchExpressionContext searchExpressionContext, String keyword) A passthrough keyword is a keyword, that according to the context, does not require to be resolved on the server, and can be passed "unresolved" to the client.
| |
| isResolverForKeyword | back to summary |
|---|---|
| public abstract boolean isResolverForKeyword(SearchExpressionContext searchExpressionContext, String keyword)
Checks if the current instance of the
| |
| resolve | back to summary |
|---|---|
| public abstract void resolve(SearchKeywordContext searchKeywordContext, UIComponent current, String keyword)
Try to resolve one or multiple
| |