public abstract class AJSFContext extends AMessaging implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
AJSFContext.RedirectOptions
Additional options for
redirect(String, RedirectOptions). |
static class |
AJSFContext.RedirectOptionsBuilder |
| Constructor and Description |
|---|
AJSFContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroySessionBean(String name) |
String |
encodeURL(String url) |
static <T> T |
findBean(Class<T> beanClass)
Finds the given bean in the current scope, creating a new bean instance if it does not exist yet.
|
static <T> T |
findBean(Class<T> beanClass,
boolean create)
Finds the given bean in the current scope.
|
static <T> T |
findBean(Class<T> beanClass,
javax.faces.context.FacesContext context)
Finds the given bean in the current scope, creating a new bean instance if it does not exist yet.
|
static <T> T |
findBean(Class<T> beanClass,
javax.faces.context.FacesContext context,
boolean create)
Finds the given bean in the current scope.
|
static <T> T |
findBean(String beanName,
Class<T> beanClass)
Finds the given bean in the current scope, creating a new bean instance if it does not exist yet.
|
static <T> T |
findBean(String beanName,
Class<T> beanClass,
javax.faces.context.FacesContext facesContext)
Finds the given bean in the current scope.
|
static <T> T |
findBean(String beanName,
Class<T> beanClass,
javax.faces.context.FacesContext facesContext,
boolean create)
Finds the given bean in the current scope, creating a new bean instance if it does not exist yet.
|
IViewModel |
findCurrentView() |
protected String |
getBeanName(Class<?> beanClass) |
protected String |
getBeanName(Object bean) |
protected String |
getContext() |
CurrentViewBean |
getCurrentViewBean() |
LocaleBean |
getLocaleBean() |
protected javax.servlet.http.HttpServletRequest |
getRequest() |
protected javax.servlet.http.HttpServletResponse |
getResponse() |
javax.servlet.http.HttpSession |
getSession()
Methode zum Auslesen der
HttpSession |
javax.servlet.http.HttpSession |
getSession(boolean create) |
protected Object |
getSessionAttribute(String attribute)
Methode zum Ermitteln eines Session-Attributs
|
static boolean |
isMasterServerContext() |
protected void |
loadLazy(Object proxy) |
void |
redirect(IViewModel view) |
void |
redirect(IViewModel view,
AJSFContext.RedirectOptions options)
Redirects to the given view.
|
void |
redirect(String location) |
void |
redirect(String location,
AJSFContext.RedirectOptions options)
Performs a redirect to the given location.
|
void |
redirectToDashboard(Benutzer user) |
void |
redirectToDashboard(Benutzer user,
AJSFContext.RedirectOptions options)
Redirects to the appropriate dashboard for the given user, ie. either
EViews.DASHBOARD or
EViews.ADMIN_DASHBOARD. |
void |
setLocaleBean(LocaleBean localeBean) |
protected void |
setSessionAttribute(String attribute,
Object o)
Methode zum Setzen eines Session-Attributs
|
UserContext |
uc() |
addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsgFromString, addErrorMsgFromString, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsgFromString, addInfoMsgFromString, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addMsg, addMsg, addMsg, addMsg, addMsgs, addMsgToComponent, addMsgToComponent, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsgFromString, addWarnMsgFromString, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, cleanErrorMsg, getErrorMessagepublic LocaleBean getLocaleBean()
public void setLocaleBean(LocaleBean localeBean)
public CurrentViewBean getCurrentViewBean()
public UserContext uc()
public void destroySessionBean(String name)
protected void loadLazy(Object proxy)
protected String getContext()
protected javax.servlet.http.HttpServletRequest getRequest()
protected javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.http.HttpSession getSession()
HttpSessionHttpSessionpublic javax.servlet.http.HttpSession getSession(boolean create)
protected Object getSessionAttribute(String attribute)
protected void setSessionAttribute(String attribute, Object o)
public IViewModel findCurrentView()
EViews; or null if it could not be determined.public static <T> T findBean(Class<T> beanClass, javax.faces.context.FacesContext context)
T - Type of the beanbeanClass - Class of the beancontext - The current faces context.null if the bean does not exist or could not be created..public static <T> T findBean(Class<T> beanClass, javax.faces.context.FacesContext context, boolean create)
T - Type of the beanbeanClass - Class of the beancontext - The current faces context.create - true to create the bean if it does not exists yet, false otherwise.null if the bean does not exist or could not be created..public static <T> T findBean(Class<T> beanClass)
T - Type of the beanbeanClass - Class of the beannull if the bean does not exist or could not be created.public static <T> T findBean(Class<T> beanClass, boolean create)
T - Type of the beanbeanClass - Class of the beancreate - true to create the bean if it does not exists yet, false otherwise.null if the bean does not exist or could not be created..public static <T> T findBean(String beanName, Class<T> beanClass)
T - Type of the beanbeanName - Name of the beanbeanClass - Class of the beannull if the bean does not exist or could not be created..public static <T> T findBean(String beanName, Class<T> beanClass, javax.faces.context.FacesContext facesContext)
T - Type of the beanbeanName - Name of the beanbeanClass - Class of the beanfacesContext - Current faces contextnull if the bean does not exist or could not be created..public static <T> T findBean(String beanName, Class<T> beanClass, javax.faces.context.FacesContext facesContext, boolean create)
T - Type of the beanbeanName - Name of the beanbeanClass - Class of the beanfacesContext - Current faces contextcreate - true to create the bean if it does not exists yet, false otherwise.null if the bean does not exist or could not be created..public void redirectToDashboard(Benutzer user)
public void redirectToDashboard(Benutzer user, AJSFContext.RedirectOptions options)
EViews.DASHBOARD or
EViews.ADMIN_DASHBOARD.user - User that is to be redirected to their dashboard.options - Additional settings for modifying how the redirect is performed.public static boolean isMasterServerContext()
public void redirect(IViewModel view)
public void redirect(IViewModel view, AJSFContext.RedirectOptions options)
view - View to which to redirect the user.options - Optional settings for modifying how the redirect is performed.public void redirect(String location)
public void redirect(String location, AJSFContext.RedirectOptions options)
location - Location to which to redirect. Must be a relative URL without the context path.options - Optional settings for modifying how the redirect is performed.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.