Package de.xima.fc.gui.bean.project
Class CurrentProjectBean.EntitySelectModelImpl
- 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.EntitySelectModel<Projekt>
-
- de.xima.fc.gui.bean.project.CurrentProjectBean.EntitySelectModelImpl
-
- All Implemented Interfaces:
IEntitySelectModel<Projekt>
,Serializable
- Enclosing class:
- CurrentProjectBean
public final class CurrentProjectBean.EntitySelectModelImpl extends EntitySelectModel<Projekt>
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.gui.model.data.EntitySelectModel
entityClass, selected
-
-
Constructor Summary
Constructors Constructor Description EntitySelectModelImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create()
void
loadLazyData()
Can be overriden to initialize lazily loaded fields on the entity.String
save(String targetView, boolean addSuccessMessage, boolean addErrorMessage)
Saves the currently selected model to the database.void
setSelected(Projekt newProject)
Sets the currently selected model to the given model.void
update()
-
Methods inherited from class de.xima.fc.gui.model.data.EntitySelectModel
addNew, delete, delete, ec, getDao, getNew, getSelected, isDetached, isNew, redirect, save, save, setSelectedById, updateSelected
-
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, 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, msg
-
-
-
-
Method Detail
-
setSelected
public void setSelected(Projekt newProject)
Description copied from interface:IEntitySelectModel
Sets the currently selected model to the given model. If the given model exists in the database but is not currently managed by an entity manager, rereads the model from the database. Thus theIEntitySelectModel.getSelected()
model may not refer to the same instance as the given model.- Specified by:
setSelected
in interfaceIEntitySelectModel<Projekt>
- Overrides:
setSelected
in classEntitySelectModel<Projekt>
- Parameters:
newProject
- The model to be selected.
-
loadLazyData
public void loadLazyData()
Description copied from interface:IEntitySelectModel
Can be overriden to initialize lazily loaded fields on the entity. By default, does not load any lazy data.- Specified by:
loadLazyData
in interfaceIEntitySelectModel<Projekt>
- Overrides:
loadLazyData
in classEntitySelectModel<Projekt>
-
create
public void create()
- Overrides:
create
in classEntitySelectModel<Projekt>
-
update
public void update()
- Overrides:
update
in classEntitySelectModel<Projekt>
-
save
public String save(String targetView, boolean addSuccessMessage, boolean addErrorMessage)
Description copied from interface:IEntitySelectModel
Saves the currently selected model to the database. If itIEntitySelectModel.isNew()
, creates a new entry in the database, otherwise updates the existing entry. Performs a redirect to the view, if given.- Specified by:
save
in interfaceIEntitySelectModel<Projekt>
- Overrides:
save
in classEntitySelectModel<Projekt>
- Parameters:
targetView
- If given, performs a redirect to this view if the action succeeds. Must be a name ofEnum.name()
, or a relative link.addSuccessMessage
- Whether a success message is added to the faces context (in case of success).addErrorMessage
- Whether an error message is added to the faces context (in case of an error).- Returns:
- Outcome for the redirection.
-
-