Class ItemListModelSelectByView<T,ID>
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.model.data.ItemListModel<T,ID>
de.xima.fc.gui.common.model.data.ItemListModelSelectByView<T,ID>
- Type Parameters:
T- Type of the item.ID- Type of the item ID.
- All Implemented Interfaces:
IItemListModel<T>, IUpdatable, Serializable
- Direct Known Subclasses:
PromptConnectionListModel, PromptQueryListModel
Extends the
ItemListModel 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 ItemListModel
all, filtered, globalFilter, hasAddNewEntity, LOG, marked, selected -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.protected abstract Stringprotected 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 ItemListModel
addMarked, addNew, castTo, create, crudCreate, crudDelete, crudRead, crudUpdate, delete, deleteEntity, deleteEntity, deleteMarkedEntities, fetchAll, findName, getAll, getAllPlusNew, getFiltered, getGlobalFilter, getId, getMarked, getNew, getSelected, hasEntity, isDetached, isEmptyList, isHasAddNewEntity, isMarkedDeletable, isNew, isPersisted, loadLazyData, onRowSelect, onRowSelectCheckbox, onRowUnselectCheckbox, onSelectionChanged, onToggleSelect, performDelete, removeMarked, save, save, setFiltered, setGlobalFilter, setHasAddNewEntity, setMarked, setSelectedFromMarked, update, updateData, updateSelectedMethods inherited from class 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 I18nUtils
getFacesContext, getLocale, rbValue, rbValue, rbValue, rbValueOrDefault, rbValueOrDefault
-
Constructor Details
-
ItemListModelSelectByView
public ItemListModelSelectByView() -
ItemListModelSelectByView
-
-
Method Details
-
getCurrentViewBean
Deprecated. -
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 interfaceIItemListModel<T>- Overrides:
setSelectedin classItemListModel<T,ID> - Parameters:
selected- The model to be selected.
-
getAllowedViewsForSelection
Deprecated.- Returns:
- A set of views for which pre-selection (
selectDefault()) is allowed for this model. If empty, no restriction is applied.
-
getSelectionTypeKey
-
putSelectionToStore
-
readSelectionFromStore
-
retrieveSelection
-
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 classItemListModel<T,ID>
-
storeSelection
-