Package de.xima.fc.gui.bean.project
Class ProjectTemplateBean.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.ProjectTemplateBean.EntitySelectModelImpl
-
- All Implemented Interfaces:
IEntitySelectModel<Projekt>
,Serializable
- Enclosing class:
- ProjectTemplateBean
public final class ProjectTemplateBean.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 protected void
create()
String
delete(String targetView)
Deletes the currently selected model from the database.String
save(String targetView, boolean addSuccessMessage, boolean addErrorMessage)
Saves the currently selected model to the database.protected void
update()
-
Methods inherited from class de.xima.fc.gui.model.data.EntitySelectModel
addNew, delete, ec, getDao, getNew, getSelected, isDetached, isNew, loadLazyData, redirect, save, save, setSelected, 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
-
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.
-
delete
public String delete(String targetView)
Description copied from interface:IEntitySelectModel
Deletes the currently selected model from the database. If the currently selected modelIEntitySelectModel.isNew()
, does nothing.- Specified by:
delete
in interfaceIEntitySelectModel<Projekt>
- Overrides:
delete
in classEntitySelectModel<Projekt>
- Parameters:
targetView
- TheEnum.name()
of a view whose view ID is returned after this operation completes successfully. Can also be a relative path, in which case that path is returned.- Returns:
- A view ID of the page to show after the model was deleted.
-
update
protected void update()
- Overrides:
update
in classEntitySelectModel<Projekt>
-
create
protected void create()
- Overrides:
create
in classEntitySelectModel<Projekt>
-
-