public interface ViewModel
DialogView.| Modifier and Type | Method and Description |
|---|---|
void |
clearViewModel()
Clear all fields of the view model.
|
Collection<no.esito.jvine.controller.FieldData> |
getAllFieldData(RoleConstant role)
Get all field values for a role.
|
Collection<DialogObjectConstant> |
getAttributeFields(AttributeConstant attribute)
Get all fields which display values for the given attribute.
|
Collection<AttributeConstant> |
getChangedAttributes(RoleConstant role)
Get a collection of changed attributes for the given role.
|
Collection<DialogObjectConstant> |
getChangedFields()
Get a collection of all changed fields for the dialog, ie.
|
<M,T> AttributeConverter<M,T> |
getConverter(DialogObjectConstant field)
Get the converter for the given field.
|
no.esito.jvine.controller.FieldData |
getCurrentFieldData(RoleConstant role)
Get the field values for the current (selected) fields of a role.
|
DialogController |
getDialogController()
Get the dialog controller for this view model.
|
<T extends ListRow> |
getDisplayList(RoleConstant role)
Get the displayed list of ListRows for the given role.
|
Object |
getFieldValue(DialogObjectConstant field)
Gets the specified field value.
Note: The field value is the value as seen from the model. |
Collection<DialogObjectConstant> |
getRoleFields(RoleConstant role)
Get the collection of fields for the given role.
|
no.esito.jvine.controller.FieldData |
getRowFieldData(ListRow row,
RoleConstant role)
Get row field values for a role.
|
<T extends ListRow> |
getTableModel(RoleConstant role)
Get the TableModel for the given role.
|
<T extends TreeNode,L extends ListRow> |
getTreeModel(DialogObjectConstant attribute)
Get the TreeModel for the given treeview.
|
FieldValidator |
getValidator(DialogObjectConstant field)
Get the validator for the given field.
|
boolean |
isChanged(DialogObjectConstant field)
Return the changed status for the given field.
|
void |
setChanged(DialogObjectConstant field,
boolean changed)
Set the changed status for the given field.
|
void |
setFieldValue(DialogObjectConstant field,
Object fieldValue)
Displays the specified field value.
|
<T extends ListRow> |
setTableModel(RoleConstant role,
TableModel<T> tableModel)
Set the TableModel for the given role.
|
void |
setTreeModel(DialogObjectConstant attribute,
TreeModel<? extends TreeNode,? extends ListRow> treeModel)
Set the TreeModel for the given treeview.
|
Object getFieldValue(DialogObjectConstant field)
toModel will be invoked for the field
value before it is returned.field - The (generated) enum denoting the role attributevoid setFieldValue(DialogObjectConstant field, Object fieldValue)
fromModel will be invoked for the field
value.field - The (generated) enum denoting the role attributefieldValue - The field value to displayboolean isChanged(DialogObjectConstant field)
field - the field to check.void setChanged(DialogObjectConstant field, boolean changed)
field - the field to set.changed - the new changed status for the given field (true/false).Collection<DialogObjectConstant> getChangedFields()
Collection<AttributeConstant> getChangedAttributes(RoleConstant role)
role - the role which owns the attributes.Collection<DialogObjectConstant> getAttributeFields(AttributeConstant attribute)
attribute - the attribute behind the fields.<T extends ListRow> List<T> getDisplayList(RoleConstant role)
T - the actual return type (subclass of List<ListRow>)role - the role which "owns" the list<T extends ListRow> TableModel<T> getTableModel(RoleConstant role)
T - actual generated subclass of ListRowrole - the role which "owns" the TableModel<T extends ListRow> void setTableModel(RoleConstant role, TableModel<T> tableModel)
T - actual generated subclass of ListRowrole - the role which "owns" the listtableModel - the table model to set<T extends TreeNode,L extends ListRow> TreeModel<T,L> getTreeModel(DialogObjectConstant attribute)
T - generated node that implements TreeNodeL - list rowattribute - the treeview dialog object constantvoid setTreeModel(DialogObjectConstant attribute, TreeModel<? extends TreeNode,? extends ListRow> treeModel)
attribute - the treeview dialog object constanttreeModel - the tree model for a given treeviewvoid clearViewModel()
<M,T> AttributeConverter<M,T> getConverter(DialogObjectConstant field)
M - modelT - targetfield - the field which has a converter.FieldValidator getValidator(DialogObjectConstant field)
field - the field which has a validator.Collection<DialogObjectConstant> getRoleFields(RoleConstant role)
role - the role which owns the field collection.DialogController getDialogController()
no.esito.jvine.controller.FieldData getRowFieldData(ListRow row, RoleConstant role)
row - The row number.role - The (generated) enum denoting the role.Collection<no.esito.jvine.controller.FieldData> getAllFieldData(RoleConstant role)
role - The (generated) enum denoting the roleno.esito.jvine.controller.FieldData getCurrentFieldData(RoleConstant role)
role - The (generated) enum denoting the roleCopyright © 2006–2020 Esito AS. All rights reserved.