Package de.xima.fc.gui.model.data
Class EntityListModelSelectByView<T extends ITransferableEntity>
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.model.data.EntityListModel<T>
de.xima.fc.gui.model.data.EntityListModelSelectByView<T>
- Type Parameters:
T- the entity type
- All Implemented Interfaces:
IEntityListModel<T>,IEntityListModelSelectByView<T>,IUpdatable,Serializable
- Direct Known Subclasses:
AppointmentTemplateListModel,ClientBean.EntityListModelImpl,ClientCounterConfigBean.EntityListModelImpl,ClientResourceBean.EntityListModelImpl,DataSourcesBean.EntityListModelImpl,DbConnectionBean.EntityListModelImpl,DbQueryBean.EntityListModelImpl,FrontendServerBean.EntityListModelImpl,InboxBean.EntityListModelImpl,LdapConnectionBean.EntityListModelImpl,LDAPGroupBean.EntityListModelImpl,LdapQueryBean.EntityListModelImpl,MandantFrontendServerBean.EntityListModelImpl,ProjectResourceBean.EntityListModelImpl,TemplatesBean.EntityListModelImpl,UserBean.EntityListModelImpl,UserGroupBean.EntityListModelImpl,UserRoleBean.EntityListModelImpl
public class EntityListModelSelectByView<T extends ITransferableEntity>
extends EntityListModel<T>
implements IEntityListModelSelectByView<T>
Extends the
EntityListModel and adds functionality for memorizing the currently selected entity for the
duration of the current session. When the user revisits a view, the previous selection is restored. Uses the
SelectionBean for storing the selection.- See Also:
-
Field Summary
Fields inherited from class de.xima.fc.gui.model.data.EntityListModel
all, entityClass, filtered, globalFilter, hasAddNewEntity, marked, qcm, selected -
Constructor Summary
ConstructorsConstructorDescriptionEntityListModelSelectByView(Class<T> entityClass, de.xima.cmn.criteria.QueryCriteriaManager qcm) EntityListModelSelectByView(Class<T> entityClass, de.xima.cmn.criteria.QueryCriteriaManager qcm, EEntityKeySelectionType keyType) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.protected voidputSelectionToStore(SelectionBean selectionBean, String key, T selected) protected TreadSelectionFromStore(SelectionBean selectionBean, String key) protected final Tprotected voidFirst attempts to retrieve the latest selection made by the user from theSelectionBean.voidsetSelected(T selected) After setting the selected entity to the given entity, stores this selection in theSelectionBean.protected final voidstoreSelection(T selected) Methods inherited from class de.xima.fc.gui.model.data.EntityListModel
addMarked, addNew, create, delete, delete, deleteEntity, deleteEntity, deleteMarkedEntities, ec, fetchAll, getAll, getAllPlusNew, getDao, getFiltered, getGlobalFilter, getMarked, getName, getNew, getSelected, hasEntity, isDetached, isEmptyList, isMarkedDeletable, isNew, loadLazyData, onRowSelect, onRowSelectCheckbox, onRowUnselectCheckbox, onToggleSelect, performDelete, removeMarked, save, save, setFiltered, setGlobalFilter, setHasAddNewEntity, setMarked, setSelectedFromMarked, update, updateData, updateSelectedMethods 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, addMsgs, addMsgToComponent, addMsgToComponent, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsgFromString, addWarnMsgFromString, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, cleanErrorMsg, errorMsg, errorMsg, getErrorMessage, getNewErrorMsg, getNewErrorMsg, getNewErrorMsg, getNewInfoMsg, getNewInfoMsg, getNewMsg, getNewWarnMsg, getNewWarnMsg, msgMethods inherited from class de.xima.fc.gui.common.utils.msg.I18nUtils
getFacesContext, getLocale, rbValue, rbValue, rbValue, rbValueOrDefault, rbValueOrDefaultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.xima.fc.gui.interfaces.data.IEntityListModel
addMarked, addNew, delete, delete, deleteEntity, deleteEntity, deleteMarkedEntities, getAll, getAllPlusNew, getFiltered, getMarked, getSelected, hasEntity, isEmptyList, isMarkedDeletable, isNew, loadLazyData, onRowSelect, onRowSelectCheckbox, onRowUnselectCheckbox, onToggleSelect, removeMarked, save, setFiltered, setMarked, setSelectedFromMarked, updateSelectedMethods inherited from interface de.xima.fc.gui.interfaces.data.IUpdatable
updateData
-
Constructor Details
-
EntityListModelSelectByView
-
EntityListModelSelectByView
public EntityListModelSelectByView(Class<T> entityClass, de.xima.cmn.criteria.QueryCriteriaManager qcm, EEntityKeySelectionType keyType)
-
-
Method Details
-
getCurrentViewBean
Deprecated. -
getEntityClassKey
- Specified by:
getEntityClassKeyin interfaceIEntityListModelSelectByView<T extends ITransferableEntity>- Returns:
- Value for the entity class in
SelectionBean.storeEntityIdFromUrl(EEntityKeySelectionType, String)
-
getSelectionBean
-
setSelected
After setting the selected entity to the given entity, stores this selection in theSelectionBean. This allows the selection to be restored when the user revisits the page (during the same session).- Specified by:
setSelectedin interfaceIEntityListModel<T extends ITransferableEntity>- Overrides:
setSelectedin classEntityListModel<T extends ITransferableEntity>- Parameters:
selected- The model to be selected.
-
readSelectionFromStore
-
getAllowedViewsForSelection
Deprecated.- Returns:
- A set of views for which pre-selection (
selectDefault()) is allowed for this model. If empty, no restriction is applied.
-
selectDefault
protected void selectDefault()First attempts to retrieve the latest selection made by the user from theSelectionBean. Uses the currentEViewsand, if applicable, current client and project as the key for storing and retrieving the selected entity (ID). This pre-selection is restricted to thegetAllowedViewsForSelection(). If no selection can be found, lets the super class choose a default selection.- Overrides:
selectDefaultin classEntityListModel<T extends ITransferableEntity>
-
retrieveSelection
-
storeSelection
-
putSelectionToStore
-