org.primefaces.expression
Class SearchExpressionFacade

java.lang.Object
  extended by org.primefaces.expression.SearchExpressionFacade

public class SearchExpressionFacade
extends Object

Simple facade for the whole Search Expression module.


Constructor Summary
SearchExpressionFacade()
           
 
Method Summary
static javax.faces.component.UIComponent resolveComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expression)
          Resolves a UIComponent for the given expression.
static String resolveComponentForClient(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expression)
          Resolves a UIComponent clientId and/or passtrough expression for the given expression.
static String resolveComponentForClient(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expression, boolean checkForRenderer)
          Resolves a UIComponent clientId and/or passtrough expression for the given expression.
static List<javax.faces.component.UIComponent> resolveComponents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expressions)
          Resolves a list of UIComponents for the given expression or expressions.
static String resolveComponentsForClient(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expressions)
          Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions.
static String resolveComponentsForClient(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expressions, boolean checkForRenderer)
          Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions.
static String resolveComponentsForClientWithParentFallback(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expressions)
          Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions.
static String resolveComponentsForClientWithParentFallback(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expressions, boolean checkForRenderer)
          Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions.
static javax.faces.component.UIComponent resolveComponentWithParentFallback(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, String expression)
          Resolves a UIComponent for the given expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchExpressionFacade

public SearchExpressionFacade()
Method Detail

resolveComponents

public static List<javax.faces.component.UIComponent> resolveComponents(javax.faces.context.FacesContext context,
                                                                        javax.faces.component.UIComponent source,
                                                                        String expressions)
Resolves a list of UIComponents for the given expression or expressions.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
Returns:
A List with resolved UIComponents.

resolveComponentsForClient

public static String resolveComponentsForClient(javax.faces.context.FacesContext context,
                                                javax.faces.component.UIComponent source,
                                                String expressions)
Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
Returns:
A List with resolved clientIds and/or passtrough expression (like PFS, widgetVar).

resolveComponentsForClient

public static String resolveComponentsForClient(javax.faces.context.FacesContext context,
                                                javax.faces.component.UIComponent source,
                                                String expressions,
                                                boolean checkForRenderer)
Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
checkForRenderer - Checks if the UIComponent has a renderer or not. This check is currently only useful for the update attributes, as a component without renderer can't be updated.
Returns:
A List with resolved clientIds and/or passtrough expression (like PFS, widgetVar).

resolveComponentsForClientWithParentFallback

public static String resolveComponentsForClientWithParentFallback(javax.faces.context.FacesContext context,
                                                                  javax.faces.component.UIComponent source,
                                                                  String expressions)
Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions. If the expressions are null or empty, the parent's clientId will be returned.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
Returns:
A List with resolved clientIds and/or passtrough expression (like PFS, widgetVar).

resolveComponentsForClientWithParentFallback

public static String resolveComponentsForClientWithParentFallback(javax.faces.context.FacesContext context,
                                                                  javax.faces.component.UIComponent source,
                                                                  String expressions,
                                                                  boolean checkForRenderer)
Resolves a list of UIComponent clientIds and/or passtrough expressions for the given expression or expressions. If the expressions are null or empty, the parent's clientId will be returned.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
checkForRenderer - Checks if the UIComponent has a renderer or not. This check is currently only useful for the update attributes, as a component without renderer can't be updated.
Returns:
A List with resolved clientIds and/or passtrough expression (like PFS, widgetVar).

resolveComponentForClient

public static String resolveComponentForClient(javax.faces.context.FacesContext context,
                                               javax.faces.component.UIComponent source,
                                               String expression)
Resolves a UIComponent clientId and/or passtrough expression for the given expression.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
Returns:
A resolved clientId and/or passtrough expression (like PFS, widgetVar).

resolveComponentForClient

public static String resolveComponentForClient(javax.faces.context.FacesContext context,
                                               javax.faces.component.UIComponent source,
                                               String expression,
                                               boolean checkForRenderer)
Resolves a UIComponent clientId and/or passtrough expression for the given expression.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
checkForRenderer - Checks if the UIComponent has a renderer or not. This check is currently only useful for the update attributes, as a component without renderer can't be updated.
Returns:
A resolved clientId and/or passtrough expression (like PFS, widgetVar).

resolveComponentWithParentFallback

public static javax.faces.component.UIComponent resolveComponentWithParentFallback(javax.faces.context.FacesContext context,
                                                                                   javax.faces.component.UIComponent source,
                                                                                   String expression)
Resolves a UIComponent for the given expression. If the expression is null or empty, the parent's clientId will be returned.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
fallbackToParent - If the expression is null, the parent component will be used.
Returns:
A resolved UIComponent or null.

resolveComponent

public static javax.faces.component.UIComponent resolveComponent(javax.faces.context.FacesContext context,
                                                                 javax.faces.component.UIComponent source,
                                                                 String expression)
Resolves a UIComponent for the given expression.

Parameters:
context - The FacesContext.
source - The source component. E.g. a button.
expression - The search expression.
Returns:
A resolved UIComponent or null.


Copyright © 2013. All rights reserved.