Package de.xima.fc.gui.common.bean
Class MenuTemplateBean
- java.lang.Object
-
- de.xima.fc.gui.common.utils.msg.I18nUtils
-
- de.xima.fc.gui.common.utils.msg.MessageUtils
-
- de.xima.fc.gui.common.utils.msg.AMessaging
-
- de.xima.fc.gui.common.utils.msg.AJSFContext
-
- de.xima.fc.gui.common.bean.MenuTemplateBean
-
- All Implemented Interfaces:
Serializable
@Named @SessionScoped public class MenuTemplateBean extends AJSFContext
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
AJSFContext.RedirectOptions, AJSFContext.RedirectOptionsBuilder
-
-
Constructor Summary
Constructors Constructor Description MenuTemplateBean()
-
Method Summary
-
Methods inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
destroySessionBean, encodeURL, findBean, findBean, findBean, findBean, findBean, findBean, findBean, findCurrentView, findUserContext, getBeanName, getBeanName, getContext, getCurrentViewBean, getLocaleBean, getRequest, getResponse, getSession, getSession, getSessionAttribute, isMasterServerContext, loadLazy, redirect, redirect, redirect, redirect, redirectToDashboard, redirectToDashboard, setLocaleBean, setSessionAttribute, uc
-
Methods inherited from class de.xima.fc.gui.common.utils.msg.MessageUtils
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, getErrorMessage, getNewErrorMsg, getNewErrorMsg, getNewErrorMsg, getNewInfoMsg, getNewInfoMsg, getNewMsg, getNewWarnMsg, getNewWarnMsg
-
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
initMainMenu
public void initMainMenu()
-
isAllowed
public boolean isAllowed(EAccessProperty... accessProperties)
-
isAllowed
public boolean isAllowed(IAccessProperty... customProperties)
-
isAllowed
public boolean isAllowed(IViewModel view)
-
addMainMenuEntry
public IMenuEntryModel addMainMenuEntry(IMenuEntryModel entry)
-
addMainMenuEntry
public IMenuEntryModel addMainMenuEntry(org.apache.commons.lang3.builder.Builder<IMenuEntryModel> builder)
-
addMainMenuEntry
public void addMainMenuEntry(CustomViewModel customView)
-
getMainMenuEntries
public List<IMenuEntryModel> getMainMenuEntries()
-
getMainMenuModel
public org.primefaces.model.menu.MenuModel getMainMenuModel()
- Returns:
- Creates the
MenuModel
for the menu component, based on the currentgetMainMenuEntries()
. This allows for dynamic menu entries and should be used in favor ofc:forEach
, which has issues when the menu entries change dynamically.
-
getAllMenuEntries
public Collection<IMenuEntryModel> getAllMenuEntries()
- Returns:
- All menu entries, including sub entries (children of #
getMainMenuEntries()
).
-
getByView
public IMenuEntryModel getByView(IViewModel view)
- Returns:
- The menu entry for the given view.
null
, if no such entry exists.
-
getClientDashboardEntries
public List<IMenuEntryModel> getClientDashboardEntries()
- Returns:
- The menu entries that are to be shown on the (client) dashboard, in the correct order.
-
getAdminDashboardEntries
public List<IMenuEntryModel> getAdminDashboardEntries(@Nullable EAdminDashCategory category)
- Parameters:
category
- If given, only returns entries for that category. Iffnull
, returns all entries for the admin dashboard.- Returns:
- The menu entries that are to be shown on the (admin) dashboard, in the correct order.
-
getSerenityMenuCookie
public String getSerenityMenuCookie(IViewModel currentView, String idPrefix)
- Parameters:
currentView
- View for which to get the cookie.- Returns:
- Value of the cookie the Serenity menu uses for storing the currently selected menu entry.
-
getSessionEventBusBean
@Deprecated public SessionEventBusBean getSessionEventBusBean()
Deprecated.
-
setSessionEventBusBean
@Deprecated public void setSessionEventBusBean(SessionEventBusBean sessionEventBusBean)
Deprecated.
-
getViewBean
@Deprecated public ViewBean getViewBean()
Deprecated.
-
setViewBean
@Deprecated public void setViewBean(ViewBean viewBean)
Deprecated.
-
getSessionBean
@Deprecated public SessionBean getSessionBean()
Deprecated.
-
setSessionBean
@Deprecated public void setSessionBean(SessionBean sessionBean)
Deprecated.
-
-