public class View
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
View() |
Modifier and Type | Method and Description |
---|---|
void |
addActionForProperty(java.lang.String property,
java.lang.String qualifiedActionName)
Add an action to the property.
|
void |
addCollectionSumProperty(java.lang.String property) |
void |
addDetailAction(java.lang.String qualifiedActionName)
Has sense if the subview represents a collection, although always works.
|
void |
addListAction(java.lang.String qualifiedActionName)
Has sense if the subview represents a collection, although always works.
|
void |
addRowAction(java.lang.String qualifiedActionName) |
void |
addValidValue(java.lang.String property,
java.lang.Object value,
java.lang.String label)
Add a new valid value to a property, generating a combo in the UI for this property.
|
void |
addValues(java.util.Map values) |
void |
assignValuesToWebView() |
void |
clear()
Clear all displayed data.
|
void |
clearValidValues(java.lang.String property)
Remove all the valid values previously added with addValidValue().
|
void |
collectionDeselectAll()
Deselects all items in collection
|
boolean |
descriptionsListsRefreshed() |
void |
deselectCollection(java.lang.String deselect) |
void |
disableValidValues(java.lang.String property)
Remove all the valid values previously added with addValidValue() and disable the combo.
|
boolean |
displayAsDescriptionsList(MetaReference ref) |
boolean |
displayAsDescriptionsListAndReferenceView() |
boolean |
displayAsDescriptionsListAndReferenceView(MetaReference ref) |
boolean |
displayDetailInCollection(java.lang.String collectionName) |
boolean |
displayReferenceWithNoFrameEditor(MetaReference ref) |
boolean |
displayReferenceWithNotCompositeEditor(MetaReference ref) |
boolean |
displayWithFrame() |
void |
findObject()
Using the key values loaded in the view search the rest of the data
from persistent storage and fill the view.
|
boolean |
findObject(MetaProperty changedProperty)
Using the key values loaded in the view search the rest of the data
from persistent storage and fill the view.
|
java.util.Collection |
getActionsNamesDetail()
Has sense if the subview represents a collection, although always works.
|
java.util.Collection |
getActionsNamesForProperty(MetaProperty p,
boolean editable) |
java.util.Collection |
getActionsNamesForReference(boolean editable)
If this is a view that represents a reference
|
java.util.Collection |
getActionsNamesForReference(MetaReference ref,
boolean editable) |
java.util.Collection |
getActionsNamesList() |
java.util.Collection |
getActionsNamesRow() |
int |
getActiveSection() |
java.lang.String |
getAddCollectionElementAction() |
java.util.Map |
getAllValues()
Copy of all values showed in view.
|
java.lang.String |
getBaseModelName()
If this view represent a polymorphic model, this method return the base class
of the hierarchy.
|
java.util.Map |
getCalculatedPropertiesNames() |
java.util.Map<java.lang.String,View> |
getChangedCollections()
Qualified ids of the collections changed in this request.
|
java.util.Map<View,java.lang.Integer> |
getChangedCollectionSizesInSections()
Views of sections that have collection size in the label, with the collection size.
|
java.util.Map<java.lang.String,int[]> |
getChangedCollectionsSelectedRows()
Indices of selected rows of collections that has changed their selected rows but not their content.
|
java.util.Map<java.lang.String,View> |
getChangedCollectionsTotals()
Qualified ids of the collections totals changed in this request.
|
java.util.Map |
getChangedLabels()
Qualified ids of the member whose labels have changed in this request.
|
java.util.Map |
getChangedPropertiesActionsAndReferencesWithNotCompositeEditor()
Qualified ids of the properties and references with not composite editor (that includes
descriptions lists) changed in this request.
|
View |
getChangedSectionsView() |
int |
getCollectionColumnWidth(int columnIndex) |
int |
getCollectionEditingRow() |
java.util.List |
getCollectionObjects()
A list of all objects (POJOs or EntityBeans) in the collection.
|
View |
getCollectionRootOrRoot() |
java.util.List |
getCollectionSelectedObjects()
A list of selected objects (POJOs or EntityBeans) in the collection.
|
java.util.List |
getCollectionSelectedValues()
A list of selected collection element when each element is a map
with the values of the collection element.
|
int |
getCollectionSize()
The size of the collection.
|
Tab |
getCollectionTab()
Tab used for manage the data of this collection. |
java.lang.Object |
getCollectionTotal(int row,
int column) |
java.lang.Object |
getCollectionTotal(java.lang.String qualifiedPropertyName,
int index) |
java.lang.String |
getCollectionTotalLabel(int row,
int column) |
java.lang.String |
getCollectionTotalPropertyName(int row,
int column) |
int |
getCollectionTotalsCount() |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getCollectionValues()
A list of all collection element when each element is a map
with the values of the collection element.
|
java.lang.String |
getConditionInDescriptionsList(MetaReference ref) |
java.lang.Object |
getDefaultValueInElementCollection(java.lang.String qualifiedPropertyName) |
java.lang.String |
getDependentCalculationPropertyNameFor(java.lang.String qualifiedName) |
java.lang.String |
getDescriptionPropertiesInDescriptionsList(MetaReference ref) |
java.lang.String |
getDescriptionPropertyInDescriptionsList(MetaReference ref) |
java.lang.String |
getDescriptionsListCondition(java.lang.String referenceName) |
int |
getDisplaySizeForProperty(MetaProperty p) |
int |
getDisplaySizeForProperty(java.lang.String propertyName) |
java.lang.String |
getEditCollectionElementAction() |
java.lang.Object |
getEntity()
Entity associated to the current view.
|
Messages |
getErrors() |
java.lang.String |
getFilterInDescriptionsList(MetaReference ref) |
java.lang.String |
getFocusPropertyId() |
View |
getGroupView(java.lang.String name) |
java.lang.String |
getHideCollectionElementAction() |
java.util.Map |
getKeyValues() |
java.util.Map |
getKeyValuesWithValue()
Excludes those values that are null, zero or empty string.
|
java.lang.String |
getLabelDecoration() |
java.lang.String |
getLabelFor(MetaMember p) |
int |
getLabelFormatForProperty(MetaProperty p) |
int |
getLabelFormatForReference(MetaReference ref) |
java.lang.String |
getLabelStyleForProperty(MetaProperty p) |
java.lang.String |
getLabelStyleForReference(MetaReference ref) |
java.lang.String |
getMemberName() |
java.util.Map |
getMembersNames() |
java.util.Map |
getMembersNamesWithHidden() |
java.util.Collection |
getMembersNamesWithoutSectionsAndCollections() |
Messages |
getMessages() |
MetaCollection |
getMetaCollection()
Meta data about the collection, only if this view represents a collection.
|
java.util.Collection<MetaMember> |
getMetaMembers() |
MetaModel |
getMetaModel() |
java.util.List<MetaProperty> |
getMetaProperties() |
java.util.List<MetaProperty> |
getMetaPropertiesList() |
MetaProperty |
getMetaProperty(java.lang.String name) |
MetaReference |
getMetaReference(java.lang.String name) |
MetaView |
getMetaView() |
java.lang.Object |
getModel()
The model object attached to this view using
setModel(Object model) . |
java.lang.String |
getModelName() |
java.lang.String |
getNewCollectionElementAction() |
java.lang.Object |
getObject(java.lang.String name)
Retrieve an object associated to this view.
|
java.lang.String |
getOnSelectCollectionElementAction() |
java.lang.String |
getOrderInDescriptionsList(MetaReference ref) |
java.lang.String |
getParameterValuesPropertiesInDescriptionsList(MetaReference ref) |
View |
getParent() |
java.util.Collection |
getPropertiesNamesFromPropertiesList(java.lang.String propertiesList) |
java.util.Collection |
getPropertiesNamesFromStereotypesList(java.lang.String stereotypesList) |
java.lang.String |
getPropertyPrefix()
Prefix used in HTML code for the properties of this view.
|
java.lang.String |
getQualifiedNameForDisplayedPropertyOrReferenceWithNotCompositeEditor(java.lang.String name)
If the property or the reference with not composite (single) editor is displayed
in this moment then the qualified name (in ModelName.memberName format) is returned.
|
java.lang.String |
getRemoveCollectionElementAction() |
java.lang.String |
getRemoveSelectedCollectionElementsAction() |
HttpServletRequest |
getRequest() |
View |
getRoot() |
java.util.Collection |
getRowActionsNames() |
java.lang.String |
getSaveCollectionElementAction() |
java.lang.String |
getSearchAction() |
java.lang.String |
getSearchKeyName() |
java.util.List |
getSections() |
View |
getSectionView(int index) |
java.util.Collection<java.lang.String> |
getSubcontrollersNamesList() |
View |
getSubview(java.lang.String name) |
java.lang.String |
getTitle() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getTotalProperties() |
java.util.Map |
getValidValues(java.lang.String property)
List of valid values associated to the property.
|
java.lang.Object |
getValue(java.lang.String name)
A value from the property name.
|
int |
getValueInt(java.lang.String name) |
java.util.Map |
getValues()
Copy of the values showed in view.
|
java.lang.String |
getValueString(java.lang.String name) |
java.lang.String |
getViewCollectionElementAction() |
java.lang.String |
getViewName() |
java.lang.String |
getViewObject()
The name of this view as session object.
|
boolean |
hasBlankValidValue(java.lang.String property)
If the property with valid values added via addValidValue() has a blank option.
|
boolean |
hasCollectionSum(int column) |
boolean |
hasCollectionTotal(int row,
int column) |
boolean |
hasCollectionTotals() |
boolean |
hasEditableChanged()
If the state of the
editable has changed in the last request. |
boolean |
hasKeyEditableChanged()
If the state of the
keyEditable has changed in the last request. |
boolean |
hasKeyProperties() |
boolean |
hasListActions() |
boolean |
hasSections() |
boolean |
hasValidValues(java.lang.String property)
If the property has valid values associated.
|
boolean |
isAlignedByColumns() |
boolean |
isCollapsed(java.lang.String name) |
boolean |
isCollectionCalculated()
Deprecated.
Since 5.3, use isCollectionFromModel() instead.
|
boolean |
isCollectionDetailVisible() |
boolean |
isCollectionEditable() |
boolean |
isCollectionFixedTotal(int column) |
boolean |
isCollectionFromModel()
If the collection data is obtained from the model collection directly.
|
boolean |
isCollectionMembersEditables() |
boolean |
isCollectionSortable() |
boolean |
isCollectionTotalCapable(int column) |
boolean |
isCollectionTotalEditable(int row,
int column) |
boolean |
isCreateNew() |
boolean |
isCreateNewForReference(MetaReference ref) |
boolean |
isDataChanged() |
boolean |
isDefaultListActionsForCollectionsIncluded() |
boolean |
isDefaultRowActionsForCollectionsIncluded() |
boolean |
isEditable() |
boolean |
isEditable(MetaProperty metaProperty)
If at this moment is editable.
|
boolean |
isEditable(MetaReference metaReference)
If at this moment is editable.
|
boolean |
isEditable(java.lang.String member) |
boolean |
isFirstInLine(MetaMember metaMember) |
boolean |
isFirstPropertyAndViewHasNoKeys(MetaProperty pr) |
boolean |
isFlowLayout() |
boolean |
isFrame() |
boolean |
isFrameClosed(java.lang.String frameId) |
boolean |
isHidden(java.lang.String name) |
boolean |
isKeyEditable() |
boolean |
isLastSearchKey(MetaProperty p) |
boolean |
isLastSearchKey(java.lang.String propertyName) |
boolean |
isMemberFromElementCollection(java.lang.String memberName) |
boolean |
isModify() |
boolean |
isModifyForReference(MetaReference ref) |
boolean |
isOnlyThrowsOnChange() |
boolean |
isOrderByKeyInDescriptionsList(MetaReference ref) |
boolean |
isPropertyUsedInCalculation(java.lang.String qualifiedName) |
boolean |
isReloadNeeded() |
boolean |
isRepresentsAggregate() |
boolean |
isRepresentsCollection() |
boolean |
isRepresentsElementCollection() |
boolean |
isRepresentsEntityReference() |
boolean |
isRepresentsSortableCollection() |
boolean |
isSearch() |
boolean |
isSearchForReference(MetaReference ref) |
boolean |
isSection() |
boolean |
isSectionEditable(java.lang.String sectionName) |
boolean |
isSimple()
To determine what type of layout to do with flowLayout activated.
|
boolean |
isSubview() |
boolean |
isVariousCollectionsInSameLine(MetaMember metaMember) |
boolean |
isVariousMembersInSameLine(MetaMember metaMember) |
void |
moveCollectionElement(int from,
int to) |
boolean |
propertyHasActions(MetaProperty p)
If the property has actions associated to it.
|
boolean |
propertyHasActions(java.lang.String name)
If the property has actions associated to it.
|
boolean |
propertyHasChangedActions(java.lang.String property) |
void |
putObject(java.lang.String name,
java.lang.Object object)
Associates an arbitrary object to this view.
|
void |
recalculateProperties() |
void |
refresh()
Refresh the displayed data from database.
|
void |
refreshCollections()
Refreshs the displayed data of all the collections of this
view from database.
|
void |
refreshDescriptionsLists()
Refresh the displayed data of all the references as descriptions list of this
view from database.
|
void |
reloadMetaModel() |
void |
removeActionForProperty(java.lang.String property,
java.lang.String qualifiedActionName)
Remove an action to the property.
|
void |
removeBlankValidValue(java.lang.String property)
Removed the blank option of a valid value created with addValidValue().
|
void |
removeCollectionSumProperty(java.lang.String property) |
void |
removeDetailAction(java.lang.String qualifiedActionName)
Has sense if the subview represents a collection, although always works.
|
void |
removeListAction(java.lang.String qualifiedActionName)
Has sense if the subview represents a collection, although always works.
|
void |
removeObject(java.lang.String name)
Remove from this view an object previously associated with @link #putObject(String, Object)
|
void |
removeRowAction(java.lang.String qualifiedActionName) |
void |
removeValidValue(java.lang.String property,
java.lang.Object value)
Removed a valid value previously added with addValidValue().
|
void |
reset()
Clear all data and set the default values.
|
void |
resetCollectionsCache() |
void |
setActionsNamesDetail(java.util.Collection collection)
Has sense if the subview represents a collection, although always works.
|
void |
setActionsNamesList(java.util.Collection collection) |
void |
setActionsNamesRow(java.util.Collection collection) |
void |
setActiveSection(int i) |
void |
setAddCollectionElementAction(java.lang.String addCollectionElementAction) |
void |
setCollapsed(java.lang.String name,
boolean collapsed) |
void |
setCollectionColumnWidth(int columnIndex,
int width) |
void |
setCollectionDetailVisible(boolean b) |
void |
setCollectionEditable(boolean b) |
void |
setCollectionEditingRow(int i) |
void |
setCollectionMembersEditables(boolean b) |
void |
setDefaultListActionsForCollectionsIncluded(boolean defaultListActionsForCollectionsIncluded) |
void |
setDefaultRowActionsForCollectionsIncluded(boolean defaultRowActionsForCollectionsIncluded) |
void |
setDescriptionsListCondition(java.lang.String referenceName,
java.lang.String condition) |
void |
setEditable(boolean b) |
void |
setEditable(java.lang.String name,
boolean editable)
To make an element of the user interface editable or not editable.
|
void |
setEditCollectionElementAction(java.lang.String editCollectionElementAction) |
void |
setErrors(Messages messages) |
void |
setFocus(java.lang.String newFocusProperty)
Sets the focus in the provided property
|
void |
setFrameClosed(java.lang.String frameId,
boolean frameClosed) |
void |
setHidden(java.lang.String name,
boolean hidden)
To hide/show an element of the user interface.
|
void |
setHideCollectionElementAction(java.lang.String hideCollectionElementAction) |
void |
setKeyEditable(boolean b) |
void |
setLabelId(java.lang.String property,
java.lang.String id) |
void |
setMemberName(java.lang.String string) |
void |
setMessages(Messages messages) |
void |
setMetaMembers(java.util.Collection metaMembers) |
void |
setModel(java.lang.Object model)
The view will be populate with data from the model object, and the model object is attached to the view.
|
void |
setModelName(java.lang.String newModel) |
void |
setNewCollectionElementAction(java.lang.String newCollectionElementAction) |
void |
setOnlyThrowsOnChange(boolean onlyThrowsOnChange) |
void |
setOnSelectCollectionElementAction(java.lang.String onSelectCollectionElementAction) |
static void |
setPolisher(java.lang.Object newPolisher) |
void |
setPropertyPrefix(java.lang.String propertyPrefix)
Prefix used in HTML code for the properties of this view.
|
static void |
setRefiner(java.lang.Object newRefiner) |
void |
setRemoveCollectionElementAction(java.lang.String removeCollectionElementAction) |
void |
setRemoveSelectedCollectionElementsAction(java.lang.String removeSelectedCollectionElementAction) |
void |
setRepresentsAggregate(boolean b) |
void |
setRepresentsCollection(boolean b) |
void |
setRepresentsEntityReference(boolean b) |
void |
setRequest(HttpServletRequest request) |
void |
setSaveCollectionElementAction(java.lang.String saveCollectionElementAction) |
void |
setSection(boolean b) |
void |
setSectionEditable(java.lang.String sectionName,
boolean editable) |
void |
setSubcontrollersNamesList(java.util.Collection collection) |
void |
setSubview(boolean b) |
void |
setTitle(java.lang.String title) |
void |
setTitleId(java.lang.String id,
java.lang.Object... arguments) |
void |
setValue(java.lang.String name,
java.lang.Object value)
Set the value to the indicated member.
|
void |
setValueNotifying(java.lang.String name,
java.lang.Object value)
Set the value and notifies the property change, recalculating all dependent properties.
|
void |
setValues(java.util.Map values) |
void |
setValuesChangingModel(java.util.Map values) |
void |
setValuesExecutingOnChangeActions(java.util.Map values)
Set the values and execute the on-change actions associated to
the assigned properties.
|
void |
setValuesNotifying(java.util.Map values)
Set the values and throws are events associated to the changed values.
|
void |
setViewCollectionElementAction(java.lang.String viewCollectionElementAction) |
void |
setViewName(java.lang.String newView) |
void |
setViewObject(java.lang.String viewObject)
The name of this view as session object.
|
boolean |
throwsPropertyChanged(MetaProperty p) |
boolean |
throwsPropertyChanged(java.lang.String propertyName) |
boolean |
throwsReferenceChanged(MetaReference ref) |
java.lang.String |
toString() |
boolean |
trySetValue(java.lang.String name,
java.lang.Object value)
Try to set the value to the indicated member.
|
void |
updateModelFromView()
Update the model object set with setModel() from data in the view.
|
public static void setRefiner(java.lang.Object newRefiner)
public static void setPolisher(java.lang.Object newPolisher)
public java.util.Collection<MetaMember> getMetaMembers() throws XavaException
XavaException
public void setMetaMembers(java.util.Collection metaMembers)
public MetaView getMetaView() throws XavaException
XavaException
public MetaModel getMetaModel() throws XavaException
XavaException
public java.util.Map getValues() throws XavaException
It's a copy, if you change it the displayed data
is not changed. If you wish change displayed data
you have to use setValues
or setValue
.
XavaException
public java.util.Map getAllValues() throws XavaException
It's a copy, if you change it the displayed data
is not changed. If you wish change displayed data
you have to use setValues
or setValue
.
XavaException
public void addValues(java.util.Map values) throws XavaException
XavaException
public void setValues(java.util.Map values) throws XavaException
XavaException
public void setValuesChangingModel(java.util.Map values) throws XavaException
XavaException
public java.lang.Object getDefaultValueInElementCollection(java.lang.String qualifiedPropertyName)
public void setValuesExecutingOnChangeActions(java.util.Map values) throws XavaException
XavaException
public void setValuesNotifying(java.util.Map values) throws XavaException
XavaException
public java.lang.Object getValue(java.lang.String name) throws XavaException
getValue("name");or qualified:
getValue("customer.name");Even you can obtain a single value from an element collection (since v5.0):
getValue("details.3.quantity");In this case you use the index for the collection after the collection name, in the case of out of range a null is returned.
name
- Qualified properties are allowedXavaException
public boolean isMemberFromElementCollection(java.lang.String memberName)
public int getValueInt(java.lang.String name) throws XavaException
name
- Qualified properties are allowedXavaException
public java.lang.String getValueString(java.lang.String name) throws XavaException
name
- Qualified properties are allowedXavaException
public View getSubview(java.lang.String name) throws XavaException
XavaException
public View getGroupView(java.lang.String name) throws XavaException
XavaException
public void setValueNotifying(java.lang.String name, java.lang.Object value) throws ElementNotFoundException, XavaException
name
- Can be qualifiedElementNotFoundException
XavaException
public void setValue(java.lang.String name, java.lang.Object value) throws XavaException
If member is not of this view an exception is thrown.
name
- Can be qualifiedXavaException
- If name is not a displayed member of this view.public boolean trySetValue(java.lang.String name, java.lang.Object value) throws XavaException
If member does not exist in view, returns false, but it does not throw exception.
name
- Can be qualifiedtrue
if member exists and it's updated, false
otherwise.XavaException
public boolean isDataChanged()
public void setSectionEditable(java.lang.String sectionName, boolean editable) throws XavaException
XavaException
public boolean isSectionEditable(java.lang.String sectionName) throws XavaException
XavaException
public java.util.Map getKeyValuesWithValue() throws XavaException
XavaException
public java.util.Map getKeyValues() throws XavaException
XavaException
public java.util.Map getMembersNamesWithHidden() throws XavaException
XavaException
public java.util.Map getMembersNames() throws XavaException
XavaException
public java.util.Map getCalculatedPropertiesNames() throws XavaException
XavaException
public Tab getCollectionTab() throws XavaException
Tab
used for manage the data of this collection.
This view must represents a collection in order to call this method.
XavaException
public MetaCollection getMetaCollection() throws XavaException
XavaException
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getCollectionValues() throws XavaException
In order to call this method this view must represents a collection.
The values only include the displayed data in the row.
XavaException
public int getCollectionSize() throws XavaException
In order to call this method this view must represents a collection.
XavaException
public java.lang.String getLabelDecoration()
public java.lang.Object getCollectionTotal(int row, int column)
public java.lang.Object getCollectionTotal(java.lang.String qualifiedPropertyName, int index)
public boolean hasCollectionTotal(int row, int column)
public boolean hasCollectionTotals()
public boolean hasCollectionSum(int column)
public int getCollectionTotalsCount()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getTotalProperties()
public void addCollectionSumProperty(java.lang.String property)
public void removeCollectionSumProperty(java.lang.String property)
public boolean isCollectionTotalCapable(int column)
public boolean isCollectionFixedTotal(int column)
public java.lang.String getCollectionTotalLabel(int row, int column)
public java.lang.String getCollectionTotalPropertyName(int row, int column)
public boolean isCollectionTotalEditable(int row, int column)
public java.util.List getCollectionSelectedValues() throws XavaException
In order to call this method this view must represents a collection.
The values only include the displayed data in the row.
XavaException
public java.util.List getCollectionObjects() throws XavaException
In order to call this method this view must represents a collection.
Generally the objects are POJOs, although if you use EJBPersistenceProvider
the they will be EntityBeans (of EJB2).
XavaException
public java.util.List getCollectionSelectedObjects() throws XavaException
In order to call this method this view must represents a collection.
Generally the objects are POJOs, although if you use EJBPersistenceProvider
the they will be EntityBeans (of EJB2).
XavaException
public boolean isCollectionFromModel() throws XavaException
If not is obtained from model usually a Tab is used to get the data.
In order to call this method this view must represents a collection.
XavaException
public boolean isCollectionCalculated() throws XavaException
In order to call this method this view must represents a collection.
XavaException
public java.util.Collection getMembersNamesWithoutSectionsAndCollections() throws XavaException
XavaException
public void reset() throws XavaException
XavaException
public java.lang.String getBaseModelName()
It can return just modelName.
public void clear() throws XavaException
XavaException
public boolean isKeyEditable()
public void setKeyEditable(boolean b) throws XavaException
XavaException
public boolean isEditable(MetaProperty metaProperty)
public boolean isEditable(MetaReference metaReference)
public boolean isEditable(java.lang.String member) throws XavaException
XavaException
public void setEditable(java.lang.String name, boolean editable) throws XavaException
name
- Name (can be qualified) of the property, reference or sectioneditable
- true to make it editable, false to make it read onlyXavaException
public boolean isEditable()
public void setEditable(boolean b) throws XavaException
XavaException
public java.lang.String getModelName()
public void setModelName(java.lang.String newModel)
public void assignValuesToWebView()
public boolean throwsPropertyChanged(MetaProperty p)
public boolean throwsPropertyChanged(java.lang.String propertyName) throws XavaException
XavaException
public boolean isFirstPropertyAndViewHasNoKeys(MetaProperty pr) throws XavaException
XavaException
public boolean hasKeyProperties() throws XavaException
XavaException
public void findObject() throws java.lang.Exception
java.lang.Exception
public boolean findObject(MetaProperty changedProperty) throws java.lang.Exception
changedProperty
- Property which change produces the search.java.lang.Exception
public void refresh()
public java.lang.Object getModel() throws XavaException
setModel(Object model)
.
If there is no model attached, that is the setModel() method has not been called on this View,
it returns null. If you want to get the view data as an entity even if you have not attached
a model to it before, use the getEntity()
method instead.
The model is not updated automatically from view data you have to call updateModelFromView() for that.
XavaException
public void updateModelFromView()
If model is null does nothing.
public void setModel(java.lang.Object model)
You can even assign a model of different type of the current one and the view will change its shape.
public java.lang.Object getEntity() throws java.lang.Exception
java.lang.Exception
public java.util.Collection getPropertiesNamesFromStereotypesList(java.lang.String stereotypesList) throws XavaException
stereotypesList
- Comma separatedXavaException
public java.util.List<MetaProperty> getMetaProperties() throws XavaException
XavaException
public MetaProperty getMetaProperty(java.lang.String name) throws XavaException
XavaException
public MetaReference getMetaReference(java.lang.String name) throws XavaException
XavaException
public java.util.List<MetaProperty> getMetaPropertiesList() throws XavaException
XavaException
public java.util.Collection getPropertiesNamesFromPropertiesList(java.lang.String propertiesList) throws XavaException
propertiesList
- Properties names comma separatedXavaException
public java.lang.String getViewName()
public void setViewName(java.lang.String newView)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isSubview()
public void setSubview(boolean b)
public boolean isRepresentsAggregate()
public void setRepresentsAggregate(boolean b)
public java.lang.String getSearchAction() throws XavaException
XavaException
public boolean isRepresentsCollection()
public boolean isRepresentsSortableCollection()
public void setRepresentsCollection(boolean b)
public boolean displayDetailInCollection(java.lang.String collectionName) throws XavaException
XavaException
public boolean isCollectionDetailVisible()
public void setCollectionDetailVisible(boolean b)
public Messages getErrors()
public Messages getMessages()
public void setErrors(Messages messages)
public void setMessages(Messages messages) throws XavaException
XavaException
public HttpServletRequest getRequest()
public void setRequest(HttpServletRequest request) throws XavaException
XavaException
public boolean displayAsDescriptionsList(MetaReference ref) throws XavaException
XavaException
public boolean displayAsDescriptionsListAndReferenceView(MetaReference ref) throws XavaException
XavaException
public java.lang.String getDescriptionPropertyInDescriptionsList(MetaReference ref) throws XavaException
XavaException
public java.lang.String getDescriptionPropertiesInDescriptionsList(MetaReference ref) throws XavaException
XavaException
public boolean throwsReferenceChanged(MetaReference ref) throws XavaException
XavaException
public java.lang.String getParameterValuesPropertiesInDescriptionsList(MetaReference ref) throws XavaException
XavaException
public java.lang.String getFilterInDescriptionsList(MetaReference ref) throws XavaException
XavaException
public java.lang.String getConditionInDescriptionsList(MetaReference ref) throws XavaException
XavaException
public java.lang.String getOrderInDescriptionsList(MetaReference ref) throws XavaException
XavaException
public boolean isOrderByKeyInDescriptionsList(MetaReference ref) throws XavaException
XavaException
public boolean isCreateNewForReference(MetaReference ref) throws XavaException
XavaException
public boolean isModifyForReference(MetaReference ref) throws XavaException
XavaException
public boolean isSearchForReference(MetaReference ref) throws XavaException
XavaException
public boolean isCreateNew() throws XavaException
XavaException
public boolean isModify() throws XavaException
XavaException
public boolean isSearch() throws XavaException
XavaException
public boolean isLastSearchKey(java.lang.String propertyName) throws XavaException
XavaException
public boolean isLastSearchKey(MetaProperty p) throws XavaException
XavaException
public boolean isRepresentsElementCollection()
public java.lang.String getSearchKeyName()
public boolean isHidden(java.lang.String name)
public void setHidden(java.lang.String name, boolean hidden) throws XavaException
name
- Name (can be qualified) of the member, group or sectionhidden
- true to hide, false to showXavaException
public View getParent()
public View getRoot()
public View getCollectionRootOrRoot()
public boolean hasSections() throws XavaException
XavaException
public boolean displayAsDescriptionsListAndReferenceView()
public boolean displayReferenceWithNoFrameEditor(MetaReference ref)
public boolean displayWithFrame()
public boolean displayReferenceWithNotCompositeEditor(MetaReference ref)
public java.util.List getSections() throws XavaException
XavaException
public View getSectionView(int index) throws XavaException
XavaException
public boolean isSection()
public void setSection(boolean b)
public int getActiveSection() throws XavaException
XavaException
public void setActiveSection(int i)
public int getCollectionEditingRow()
public void setCollectionEditingRow(int i)
public java.lang.String getMemberName()
public void setMemberName(java.lang.String string) throws XavaException
XavaException
public boolean isCollectionMembersEditables()
public void setCollectionMembersEditables(boolean b)
public boolean isCollectionSortable()
public boolean isCollectionEditable()
public void setCollectionEditable(boolean b)
public boolean isRepresentsEntityReference()
public void setRepresentsEntityReference(boolean b)
public java.util.Collection getActionsNamesDetail()
public void setActionsNamesDetail(java.util.Collection collection)
public void addDetailAction(java.lang.String qualifiedActionName)
qualifiedActionName
- Qualified name (controller.action) as in controllers.xmlpublic void removeDetailAction(java.lang.String qualifiedActionName)
qualifiedActionName
- Qualified name (controller.action) as in controllers.xmlpublic void addListAction(java.lang.String qualifiedActionName)
qualifiedActionName
- Qualified name (controller.action) as in controllers.xmlpublic void addRowAction(java.lang.String qualifiedActionName)
public void removeRowAction(java.lang.String qualifiedActionName)
public void removeListAction(java.lang.String qualifiedActionName)
qualifiedActionName
- Qualified name (controller.action) as in controllers.xmlpublic java.util.Collection getRowActionsNames()
public java.util.Collection getActionsNamesList()
public java.util.Collection<java.lang.String> getSubcontrollersNamesList()
public boolean hasListActions()
public void setActionsNamesList(java.util.Collection collection)
public void setSubcontrollersNamesList(java.util.Collection collection)
public void setActionsNamesRow(java.util.Collection collection)
public java.util.Collection getActionsNamesRow()
public java.util.Collection getActionsNamesForProperty(MetaProperty p, boolean editable) throws XavaException
XavaException
public java.util.Collection getActionsNamesForReference(MetaReference ref, boolean editable) throws XavaException
XavaException
public java.util.Collection getActionsNamesForReference(boolean editable) throws XavaException
XavaException
public int getLabelFormatForProperty(MetaProperty p) throws XavaException
XavaException
public int getLabelFormatForReference(MetaReference ref) throws XavaException
XavaException
public boolean isSimple()
public boolean isFlowLayout()
public int getDisplaySizeForProperty(MetaProperty p) throws XavaException
XavaException
public int getDisplaySizeForProperty(java.lang.String propertyName) throws XavaException
XavaException
public boolean isFrame() throws XavaException
XavaException
public java.lang.String getFocusPropertyId()
public void setFocus(java.lang.String newFocusProperty)
public java.lang.String getEditCollectionElementAction()
public java.lang.String getViewCollectionElementAction()
public void setEditCollectionElementAction(java.lang.String editCollectionElementAction)
public void setViewCollectionElementAction(java.lang.String viewCollectionElementAction)
public void recalculateProperties()
public java.lang.String getLabelFor(MetaMember p) throws XavaException
XavaException
public void setLabelId(java.lang.String property, java.lang.String id)
property
- Since v4.2 can qualified. Since v6.4 can be a group or section nameid
- Id of the label from i18n filespublic boolean isOnlyThrowsOnChange()
public void setOnlyThrowsOnChange(boolean onlyThrowsOnChange)
public void setCollectionColumnWidth(int columnIndex, int width)
public int getCollectionColumnWidth(int columnIndex)
public java.lang.String getHideCollectionElementAction()
public void setHideCollectionElementAction(java.lang.String hideCollectionElementAction)
public java.lang.String getAddCollectionElementAction()
public java.lang.String getNewCollectionElementAction()
public void setNewCollectionElementAction(java.lang.String newCollectionElementAction)
public java.lang.String getRemoveCollectionElementAction()
public void setRemoveCollectionElementAction(java.lang.String removeCollectionElementAction)
public java.lang.String getRemoveSelectedCollectionElementsAction()
public void setRemoveSelectedCollectionElementsAction(java.lang.String removeSelectedCollectionElementAction)
public java.lang.String getSaveCollectionElementAction()
public void setSaveCollectionElementAction(java.lang.String saveCollectionElementAction)
public boolean isAlignedByColumns() throws XavaException
XavaException
public void putObject(java.lang.String name, java.lang.Object object)
This object is not used by the view for any purpose,
this is only a convenience method for developer.
name
- The id to retrieve the object later.object
- The object to associate.public java.lang.Object getObject(java.lang.String name)
The object have to be associated to this view using @link #putObject(String, Object)
name
- Name of the object to retrieve.public void removeObject(java.lang.String name)
name
- Name of the object to remove.public java.util.Map getChangedPropertiesActionsAndReferencesWithNotCompositeEditor()
This does not have a valid value until the end of the request, and it's intended to be used from the AJAX code in order to determine what to refresh.
public boolean hasEditableChanged()
editable has changed in the last request.
This does not have a valid value until the end of the request, and it's intended
to be used from the AJAX code in order to determine what to refresh.
public boolean hasKeyEditableChanged()
keyEditable has changed in the last request.
This does not have a valid value until the end of the request, and it's intended
to be used from the AJAX code in order to determine what to refresh.
public boolean descriptionsListsRefreshed()
public void refreshDescriptionsLists()
public void refreshCollections()
public java.util.Map getChangedLabels()
This does not have a valid value until the end of the request, and it's intended to be used from the AJAX code in order to determine what to refresh.
public java.util.Map<java.lang.String,View> getChangedCollections()
This does not have a valid value until the end of the request, and it's intended to be used from the AJAX code in order to determine what to refresh.
public java.util.Map<View,java.lang.Integer> getChangedCollectionSizesInSections()
This does not have a valid value until the end of the request, and it's intended to be used from the AJAX code in order to determine what to refresh.
public java.util.Map<java.lang.String,View> getChangedCollectionsTotals()
This does not have a valid value until the end of the request, and it's intended to be used from the AJAX code in order to determine what to refresh.
public java.util.Map<java.lang.String,int[]> getChangedCollectionsSelectedRows()
This does not have a valid value until the end of the request, and it's intended to be used from the AJAX code in order to determine what to refresh.
public void setViewObject(java.lang.String viewObject)
public java.lang.String getViewObject()
public void setPropertyPrefix(java.lang.String propertyPrefix)
public java.lang.String getPropertyPrefix()
public void resetCollectionsCache()
public View getChangedSectionsView()
public boolean isReloadNeeded()
public java.lang.String getQualifiedNameForDisplayedPropertyOrReferenceWithNotCompositeEditor(java.lang.String name)
name
- Can be the simple or the qualified name of the memberpublic boolean propertyHasActions(java.lang.String name)
If the actions are showed or not in this moment has no effect in the result.
public boolean propertyHasActions(MetaProperty p)
If the actions are showed or not in this moment has no effect in the result.
public java.lang.String getOnSelectCollectionElementAction()
public void setOnSelectCollectionElementAction(java.lang.String onSelectCollectionElementAction)
public boolean isVariousCollectionsInSameLine(MetaMember metaMember)
public boolean isVariousMembersInSameLine(MetaMember metaMember)
public boolean isFirstInLine(MetaMember metaMember)
public boolean isDefaultListActionsForCollectionsIncluded()
public void setDefaultListActionsForCollectionsIncluded(boolean defaultListActionsForCollectionsIncluded)
public boolean isDefaultRowActionsForCollectionsIncluded()
public void setDefaultRowActionsForCollectionsIncluded(boolean defaultRowActionsForCollectionsIncluded)
public void setTitleId(java.lang.String id, java.lang.Object... arguments)
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public java.lang.String getLabelStyleForProperty(MetaProperty p) throws XavaException
XavaException
public java.lang.String getLabelStyleForReference(MetaReference ref) throws XavaException
XavaException
public void setCollapsed(java.lang.String name, boolean collapsed)
public boolean isCollapsed(java.lang.String name)
public void setFrameClosed(java.lang.String frameId, boolean frameClosed)
public boolean isFrameClosed(java.lang.String frameId)
public void addActionForProperty(java.lang.String property, java.lang.String qualifiedActionName) throws XavaException
The action will be show even if the view or the property is not editable.
XavaException
public void removeActionForProperty(java.lang.String property, java.lang.String qualifiedActionName) throws XavaException
Only the actions added with addActionForProperty() can be removed.
XavaException
public boolean propertyHasChangedActions(java.lang.String property)
public void collectionDeselectAll()
public void deselectCollection(java.lang.String deselect)
as
- 'ox_OpenXavaTest_CarrierWithCollectionsTogether__xava_collectionTab_fellowCarriers:1,3,2'public void moveCollectionElement(int from, int to) throws java.lang.Exception
java.lang.Exception
public void reloadMetaModel()
public void setAddCollectionElementAction(java.lang.String addCollectionElementAction)
public boolean isPropertyUsedInCalculation(java.lang.String qualifiedName)
public java.lang.String getDependentCalculationPropertyNameFor(java.lang.String qualifiedName)
public void addValidValue(java.lang.String property, java.lang.Object value, java.lang.String label)
private String color;You can add a combo programmatically in this way:
getView().addValidValue("color", "wht", "White"); getView().addValidValue("color", "blk", "Black");This creates a combo for color property with two values wht with label White and blk with label Black.
property
- The name of the property. It has to be in the model, but not in the view in this moment.value
- The value that will be store in the property, the type has to match with the property type.label
- The label shown in the combo.public void removeValidValue(java.lang.String property, java.lang.Object value)
property
- The name of the property. It has to be in the model, but not in the view in this moment.value
- The valid value stored in the property that we want to remove, the type has to match with the property type.public void clearValidValues(java.lang.String property)
property
- The name of the property. It has to be in the model, but not in the view in this moment.public void disableValidValues(java.lang.String property)
property
- The name of the property. It has to be in the model, but not in the view in this moment.public void removeBlankValidValue(java.lang.String property)
property
- The name of the property. It has to be in the model, but not in the view in this moment.public boolean hasBlankValidValue(java.lang.String property)
property
- The name of the property. It has to be in the model, but not in the view in this moment.public boolean hasValidValues(java.lang.String property)
Valid values are added via addValidValue().
property
- The name of the property. It has to be in the model, but not in the view in this moment.public java.util.Map getValidValues(java.lang.String property)
Valid values are added via addValidValue().
property
- The name of the property. It has to be in the model, but not in the view in this moment.public void setDescriptionsListCondition(java.lang.String referenceName, java.lang.String condition) throws XavaException
XavaException
public java.lang.String getDescriptionsListCondition(java.lang.String referenceName) throws XavaException
XavaException