getFacesContext
public static FacesContext getFacesContext(){return FacesContext.getCurrentInstance();
}
getRequestParameter
public static String getRequestParameter(String name) {return (String) FacesContext.getCurrentInstance().getExternalContext()
.getRequestParameterMap().get(name);
}
getApplication
public static Application getApplication(FacesContext facesContext) {return facesContext.getApplication();
}
getManagedBean
public static Object getManagedBean( String mgdBeanName, FacesContext facesContext) {
String expression = "#{" + mgdBeanName + "}";
return resolveExpression(expression, facesContext);
}
getBackingBean
public static Object getBackingBean( String backingBeanName, FacesContext facesContext) {
return getManagedBean(backingBeanName, facesContext);
}
getPortletSession
public static PortletSession getPortletSession() {PortletRequest request = (PortletRequest) getFacesContext()
.getExternalContext().getRequest();
return request.getPortletSession();
}
getPortletContext
public static PortletContext getPortletContext(){ return (PortletContext)getFacesContext().
getExternalContext().getContext();
}
public static Object getSessionMapValue(String key) {
return FacesContext.getCurrentInstance().getExternalContext().
getSessionMap().get(key);
}
getPortletContext
public static PortletContext getPortletContext(){
return (PortletContext)getFacesContext().
getExternalContext().getContext();
}
getHttpServletRequest
public static HttpServletRequest getHttpServletRequest(){return (HttpServletRequest)getFacesContext().
getExternalContext().getRequest();
}
0 comments:
Post a Comment