public abstract class FacesDialogBean extends Object implements Serializable
| Constructor and Description |
|---|
FacesDialogBean(DialogConstant dialog)
Create a new backing bean for the given dialog.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyToEquivalentFields(DialogObjectConstant field,
Object value)
Delegate method for the view model.
|
void |
defaultButtonActionListener(javax.faces.event.ActionEvent event)
Execute the action listener method for the current default button.
|
protected void |
dispatchEvent(DialogObjectConstant trigger,
Object event,
String method)
Delegate the event dispatch to the view.
|
protected void |
dispatchEvent(ListRow listRow,
DialogObjectConstant trigger,
Object event,
String method)
Delegate the event dispatch to the view, with listRow.
|
protected void |
dispatchSystemMessages(DialogObjectConstant trigger,
String systemMessagesInJson)
Dispatch the JSON messages.
|
FacesApplicationBean |
getApplicationBean()
Get the JSF managed bean which references the application view.
|
List<org.icefaces.ace.component.submenu.Submenu> |
getApplicationMenu() |
org.icefaces.ace.model.MenuModel |
getApplicationMenuModel() |
protected int |
getCurrentNotebookIndex(DialogObjectConstant notebook)
Get the current Notebook index from the view.
|
protected DialogObjectConstant |
getCurrentNotebookPage(DialogObjectConstant notebook)
Get the current Notebook page from the view.
|
int |
getDialogInstanceNumber()
Gets the 1-based dialog instance number.
|
String |
getDialogTitle()
Get the title for this dialog.
|
String |
getDialogToolbarIncludePath()
Get the JSF facelet dynamic include path for the toolbar of the current
dialog.
|
protected <T extends FacesDialogView> |
getDialogView() |
Map<?,?> |
getEditable() |
Map<?,?> |
getEffect() |
Map<?,?> |
getEnabled() |
Map<?,?> |
getExpanded() |
protected javax.faces.component.UIComponent |
getFacesComponent(javax.faces.component.UIComponent comp,
String key)
Delegate to the view.
|
protected String |
getFacesId(DialogObjectConstant target)
Delegate to the view.
|
protected Object |
getField(DialogObjectConstant field)
Get the field (view model value) for the given field.
|
protected Object |
getFieldValue(DialogObjectConstant field)
Delegate method for the view model.
|
protected ListRow |
getListRow(no.g9.os.RoleConstant listRole,
Object contextValue)
Get the ListRow for the given context value.
|
Map<?,?> |
getMandatory() |
String |
getMessageBundleName() |
protected org.icefaces.ace.model.tree.NodeStateMap |
getNodeStateMap(DialogObjectConstant diaConst)
Get the node state map for the given dialog constant.
|
protected int |
getOldNotebookIndex(DialogObjectConstant notebook)
Get the old Notebook index from the view.
|
protected Collection<DialogObjectConstant> |
getRoleFields(no.g9.os.RoleConstant role)
Delegate method for the view model.
|
protected org.icefaces.ace.model.table.RowStateMap |
getRowStateMap(no.g9.os.RoleConstant role)
Get the row state map for the given role.
|
Map<?,?> |
getShown() |
Map<?,?> |
getSortAscending() |
Map<?,?> |
getSortPriority() |
Map<?,?> |
getTitle() |
protected no.esito.jvine.view.ViewModelImpl |
getViewModel() |
protected boolean |
handleListSelection(no.g9.os.RoleConstant listRole,
boolean selected,
int rowNo,
ListRow emptyRow)
Delegate the list selection handling to the view.
|
protected boolean |
hasOpenDialogView() |
protected void |
hide(DialogObjectConstant target)
Delegate the hide operation to the view.
|
protected abstract void |
initBean()
Initialization of the bean.
|
protected void |
initPropertyMaps(Class enumClass)
Initialize the property maps for this dialog bean.
|
String |
msg(String key)
Get the message text for the given key.
|
void |
setApplicationBean(FacesApplicationBean applicationBean)
Set the JSF backing bean for the application.
|
void |
setAsActiveInstance()
Set this dialog instance as the active instance for this dialog model.
|
protected void |
setCurrentNotebookIndex(DialogObjectConstant notebook,
int index)
Set the current Notebook index in the view.
|
protected void |
setCurrentNotebookPage(DialogObjectConstant notebook,
DialogObjectConstant page)
Set the current Notebook page in the view.
|
void |
setDialogInstanceNumber(int dialogInstanceNumber)
Sets the 1-based dialog instance number.
|
protected void |
setField(DialogObjectConstant field,
Object value)
Set the field (view model value) for the given field.
|
protected void |
setFieldValue(DialogObjectConstant field,
Object fieldValue)
Delegate method for the view model.
|
protected void |
setListSelectionRowNum(int rowNum)
Sets the selected row num in the dialog view, so that
it may be fetched during action Select later.
|
protected void |
setNodeStateMap(DialogObjectConstant diaConst,
org.icefaces.ace.model.tree.NodeStateMap nodeStateMap)
Set the node state map for the given dialog constant.
|
protected void |
setOldNotebookIndex(DialogObjectConstant notebook,
int index)
Set the old Notebook index in the view.
|
protected void |
show(DialogObjectConstant target)
Delegate the show operation to the view.
|
protected void |
updateRowState(no.g9.os.RoleConstant role)
Update the row states for the given role.
|
protected boolean |
validateField(DialogObjectConstant field,
Object newValue,
Object oldValue)
Validate the new value for the given field.
|
protected boolean |
validateField(ListRow listRow,
DialogObjectConstant field,
Object newValue,
Object oldValue)
Validate the new value for the given field.
|
public FacesDialogBean(DialogConstant dialog)
dialog - the dialog for this bean.public Map<?,?> getEditable()
public Map<?,?> getEnabled()
public Map<?,?> getMandatory()
public Map<?,?> getShown()
public Map<?,?> getExpanded()
public Map<?,?> getEffect()
public Map<?,?> getTitle()
public Map<?,?> getSortPriority()
public Map<?,?> getSortAscending()
protected org.icefaces.ace.model.table.RowStateMap getRowStateMap(no.g9.os.RoleConstant role)
role - the role to get the row state map forprotected void updateRowState(no.g9.os.RoleConstant role)
role - the owning role of the tableprotected org.icefaces.ace.model.tree.NodeStateMap getNodeStateMap(DialogObjectConstant diaConst)
diaConst - the dialog constant to get the node state map forprotected void setNodeStateMap(DialogObjectConstant diaConst, org.icefaces.ace.model.tree.NodeStateMap nodeStateMap)
diaConst - the dialog constant to set the node state map fornodeStateMap - the nodeStateMap to setprotected void initPropertyMaps(Class enumClass)
enumClass - - the class for the const enum for this dialog.protected DialogObjectConstant getCurrentNotebookPage(DialogObjectConstant notebook)
notebook - the Notebook in question.protected void setCurrentNotebookPage(DialogObjectConstant notebook, DialogObjectConstant page)
notebook - the Notebook.page - the new current page for the Notebook.protected int getCurrentNotebookIndex(DialogObjectConstant notebook)
notebook - the Notebook in question.protected void setCurrentNotebookIndex(DialogObjectConstant notebook, int index)
notebook - the Notebook.index - the new current page index for the Notebook.protected int getOldNotebookIndex(DialogObjectConstant notebook)
notebook - the Notebook in question.protected void setOldNotebookIndex(DialogObjectConstant notebook, int index)
notebook - the Notebook.index - the new old page index for the Notebook.protected boolean handleListSelection(no.g9.os.RoleConstant listRole,
boolean selected,
int rowNo,
ListRow emptyRow)
listRole - - the object selection role for the listselected - - true if the row is to be selectedrowNo - - the list row in questionemptyRow - - an empty list row containing a collection of all the fields
in a list rowprotected void setListSelectionRowNum(int rowNum)
rowNum - row numberprotected void show(DialogObjectConstant target)
target - the dialog object to show.protected void hide(DialogObjectConstant target)
target - the dialog object to hide.protected void dispatchEvent(DialogObjectConstant trigger, Object event, String method)
trigger - the cause of the event.event - the type of event.method - the event method name.protected void dispatchSystemMessages(DialogObjectConstant trigger, String systemMessagesInJson)
trigger - the cause of the eventsystemMessagesInJson - JSON coded array of messagesprotected void dispatchEvent(ListRow listRow, DialogObjectConstant trigger, Object event, String method)
listRow - the ListRow in which the event occurred.trigger - the cause of the event.event - the type of event.method - the event method name.public String getDialogToolbarIncludePath()
public org.icefaces.ace.model.MenuModel getApplicationMenuModel()
public List<org.icefaces.ace.component.submenu.Submenu> getApplicationMenu()
public String msg(String key)
key - the message key for the messageprotected void copyToEquivalentFields(DialogObjectConstant field, Object value)
field - the field with the input value.value - the field value to copy.protected Object getField(DialogObjectConstant field)
field - the field holds the value for this field.protected void setField(DialogObjectConstant field, Object value)
field - the field holds the value for this field.value - the new field value.protected Object getFieldValue(DialogObjectConstant field)
field - The (generated) enum denoting the role attributeprotected void setFieldValue(DialogObjectConstant field, Object fieldValue)
field - The (generated) enum denoting the role attributefieldValue - The field value to display (possibly converted from model to view value)protected Collection<DialogObjectConstant> getRoleFields(no.g9.os.RoleConstant role)
role - the role which owns the field collection.public FacesApplicationBean getApplicationBean()
public void setApplicationBean(FacesApplicationBean applicationBean)
applicationBean - the new JSF application bean.public int getDialogInstanceNumber()
public void setDialogInstanceNumber(int dialogInstanceNumber)
dialogInstanceNumber - the new dialog instance number.DialogConstant.getMaximumNumberOfInstances()public void setAsActiveInstance()
protected abstract void initBean()
protected <T extends FacesDialogView> T getDialogView()
T - The dialog view typeprotected boolean hasOpenDialogView()
protected no.esito.jvine.view.ViewModelImpl getViewModel()
protected boolean validateField(DialogObjectConstant field, Object newValue, Object oldValue)
field - the field to validate.newValue - the new field value (which is to be validated).oldValue - the old field value.protected boolean validateField(ListRow listRow, DialogObjectConstant field, Object newValue, Object oldValue)
listRow - the ListRow in which the event occurred.field - the field to validate.newValue - the new field value (which is to be validated).oldValue - the old field value.public String getDialogTitle()
protected ListRow getListRow(no.g9.os.RoleConstant listRole, Object contextValue)
listRole - the role for the list which contains the row.contextValue - the context value from the JSF event.public String getMessageBundleName()
public void defaultButtonActionListener(javax.faces.event.ActionEvent event)
event - the JSF eventprotected String getFacesId(DialogObjectConstant target)
target - the dialog object to look upprotected javax.faces.component.UIComponent getFacesComponent(javax.faces.component.UIComponent comp,
String key)
comp - the parent component, or nullkey - the JSF component idCopyright © 2006–2018 Esito AS. All rights reserved.