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 voidcreate()voidloadLazyData()Can be overriden to initialize lazily loaded fields on the entity.Stringsave(String targetView, boolean addSuccessMessage, boolean addErrorMessage)Saves the currently selected model to the database.voidsetSelected(Projekt newProject)Sets the currently selected model to the given model.voidupdate()-
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
-
Methods inherited from class de.xima.fc.gui.common.utils.msg.I18nUtils
getFacesContext, getLocale, rbValue, rbValue, rbValue, rbValueOrDefault, rbValueOrDefault
-
-
-
-
Method Detail
-
setSelected
public void setSelected(Projekt newProject)
Description copied from interface:IEntitySelectModelSets 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:
setSelectedin interfaceIEntitySelectModel<Projekt>- Overrides:
setSelectedin classEntitySelectModel<Projekt>- Parameters:
newProject- The model to be selected.
-
loadLazyData
public void loadLazyData()
Description copied from interface:IEntitySelectModelCan be overriden to initialize lazily loaded fields on the entity. By default, does not load any lazy data.- Specified by:
loadLazyDatain interfaceIEntitySelectModel<Projekt>- Overrides:
loadLazyDatain classEntitySelectModel<Projekt>
-
create
public void create()
- Overrides:
createin classEntitySelectModel<Projekt>
-
update
public void update()
- Overrides:
updatein classEntitySelectModel<Projekt>
-
save
public String save(String targetView, boolean addSuccessMessage, boolean addErrorMessage)
Description copied from interface:IEntitySelectModelSaves 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:
savein interfaceIEntitySelectModel<Projekt>- Overrides:
savein 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.
-
-