public final class FacesHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BROWSE_VIEW_ID
Root browse screen JSF view ID
|
Modifier and Type | Method and Description |
---|---|
static IComponentGenerator |
getComponentGenerator(FacesContext context,
String generatorName)
Retrieves the named component generator implementation.
|
static FacesContext |
getFacesContext(Object request,
Object response,
Object context)
Return a valid FacesContext for the specific context, request and response.
|
static FacesContext |
getFacesContext(ServletRequest request,
ServletResponse response,
ServletContext context)
Return a valid FacesContext for the specific context, request and response.
|
static FacesContext |
getFacesContext(ServletRequest request,
ServletResponse response,
ServletContext context,
String viewRoot)
Return a valid FacesContext for the specific context, request and response.
|
static Object |
getManagedBean(FacesContext fc,
String name)
Return a JSF managed bean reference.
|
static String |
makeLegalId(String id)
Makes the given id a legal JSF component id by replacing illegal characters
with ISO9075 encoding - which itself a subset of valid HTML ID characters.
|
static void |
setupComponentId(FacesContext context,
UIComponent component,
String id)
Sets up the id for the given component, if the id is null a unique one
is generated using the standard Faces algorithm.
|
public static final String BROWSE_VIEW_ID
public static FacesContext getFacesContext(ServletRequest request, ServletResponse response, ServletContext context)
context
- ServletContextrequest
- ServletRequestresponse
- ServletReponsepublic static FacesContext getFacesContext(ServletRequest request, ServletResponse response, ServletContext context, String viewRoot)
context
- ServletContextrequest
- ServletRequestresponse
- ServletReponsepublic static FacesContext getFacesContext(Object request, Object response, Object context)
context
- PortletContextrequest
- PortletRequestresponse
- PortletResponsepublic static Object getManagedBean(FacesContext fc, String name)
fc
- FacesContextname
- Name of the managed bean to returnpublic static void setupComponentId(FacesContext context, UIComponent component, String id)
context
- FacesContextcomponent
- The component to set the id forid
- The id to setpublic static String makeLegalId(String id)
id
- The id to make legalpublic static IComponentGenerator getComponentGenerator(FacesContext context, String generatorName)
context
- FacesContextgeneratorName
- The name of the component generator to retrieveCopyright © 2005–2017 Alfresco Software. All rights reserved.