Class View
- All Implemented Interfaces:
Serializable
- Author:
- Javier Paniza
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActionForProperty(String property, String qualifiedActionName) Add an action to the property.voidaddCollectionSumProperty(String property) voidaddDetailAction(String qualifiedActionName) Has sense if the subview represents a collection, although always works.voidaddListAction(String qualifiedActionName) Has sense if the subview represents a collection, although always works.voidaddRowAction(String qualifiedActionName) voidaddValidValue(String property, Object value, String label) Add a new valid value to a property, generating a combo in the UI for this property.voidvoidvoidclear()Clear all displayed data.voidRemove all CSS styles set withsetStyle(String, String).voidclearValidValues(String property) Remove all the valid values previously added with addValidValue().voidDeselects all items in collectionbooleanvoiddeselectCollection(String deselect) voiddisableValidValues(String property) Remove all the valid values previously added with addValidValue() and disable the combo.booleanbooleanbooleanbooleandisplayDetailInCollection(String collectionName) booleanbooleanbooleanvoidUsing the key values loaded in the view search the rest of the data from persistent storage and fill the view.booleanfindObject(MetaProperty changedProperty) Using the key values loaded in the view search the rest of the data from persistent storage and fill the view.booleanfindObject(MetaProperty changedProperty, Map extraKeysForSearchingReference) Using the key values loaded in the view and the parameter map to search from persistent storage and fill the view.Has sense if the subview represents a collection, although always works.getActionsNamesForProperty(MetaProperty p, boolean editable) getActionsNamesForReference(boolean editable) If this is a view that represents a referencegetActionsNamesForReference(MetaReference ref, boolean editable) intCopy of all values showed in view.If this view represent a polymorphic model, this method return the base class of the hierarchy.Qualified ids of the collections changed in this request.Views of sections that have collection size in the label, with the collection size.Indices of selected rows of collections that has changed their selected rows but not their content.Qualified ids of the collections totals changed in this request.Qualified ids of the member whose labels have changed in this request.Qualified ids of the properties and references with not composite editor (that includes descriptions lists) changed in this request.intgetCollectionColumnWidth(int columnIndex) intA list of all objects (POJOs or EntityBeans) in the collection.A list of selected objects (POJOs or EntityBeans) in the collection.A list of selected collection element when each element is a map with the values of the collection element.intThe size of the collection.Tabused for manage the data of this collection.getCollectionTotal(int row, int column) getCollectionTotal(String qualifiedPropertyName, int index) getCollectionTotalLabel(int row, int column) getCollectionTotalPropertyName(int row, int column) intA list of all collection element when each element is a map with the values of the collection element.getDefaultValueInElementCollection(String qualifiedPropertyName) getDependentCalculationPropertiesNamesFor(String qualifiedName) getDescriptionsListCondition(String referenceName) intgetDisplaySizeForProperty(String propertyName) intEntity associated to the current view.getGroupView(String name) Excludes those values that are null, zero or empty string.intintMeta data about the collection, only if this view represents a collection.getMetaProperty(String name) getMetaReference(String name) getModel()The model object attached to this view usingsetModel(Object model).Retrieve an object associated to this view.getPropertiesNamesFromPropertiesList(String propertiesList) getPropertiesNamesFromStereotypesList(String stereotypesList) Prefix used in HTML code for the properties of this view.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.javax.servlet.http.HttpServletRequestgetRoot()getSectionView(int index) The CSS style class for the specified property.getSubview(String name) getTitle()getValidValues(String property) List of valid values associated to the property.A value from the property name.intgetValueInt(String name) Copy of the values showed in view.getValueString(String name) The name of this view as session object.booleanhasBlankValidValue(String property) If the property with valid values added via addValidValue() has a blank option.booleanbooleanhasCollectionSum(int column) booleanhasCollectionTotal(int row, int column) booleanbooleanIf the state of theeditable has changed in the last request.booleanIf the state of thekeyEditable has changed in the last request.booleanbooleanbooleanbooleanhasValidValues(String property) If the property has valid values associated.booleanbooleanisCollapsed(String name) booleanDeprecated.Since 5.3, use isCollectionFromModel() instead.booleanbooleanbooleanisCollectionFixedTotal(int column) booleanIf the collection data is obtained from the model collection directly.booleanbooleanbooleanisCollectionTotalCapable(int column) booleanisCollectionTotalEditable(int row, int column) booleanbooleanbooleanbooleanbooleanbooleanbooleanisEditable(String member) booleanisEditable(MetaProperty metaProperty) If at this moment is editable.booleanisEditable(MetaReference metaReference) If at this moment is editable.booleanisFirstInLine(MetaMember metaMember) booleanbooleanbooleanisFrame()booleanisFrameClosed(String frameId) booleanbooleanbooleanisLastSearchKey(String propertyName) booleanbooleanisMemberFromElementCollection(String memberName) booleanisModify()booleanbooleanbooleanbooleanisPropertyUsedInCalculation(String qualifiedName) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisRowActionHaveIcon(Collection rowActions) booleanisSearch()booleanbooleanbooleanisSectionEditable(String sectionName) booleanisSimple()To determine what type of layout to do with flowLayout activated.booleanbooleanisVariousCollectionsInSameLine(MetaMember metaMember) booleanisVariousMembersInSameLine(MetaMember metaMember) voidmoveCollectionElement(int from, int to) booleanpropertyHasActions(String name) If the property has actions associated to it.booleanIf the property has actions associated to it.booleanpropertyHasChangedActions(String property) voidAssociates an arbitrary object to this view.voidvoidrefresh()Refresh the displayed data from database.voidRefreshs the displayed data of all the collections of this view from database.voidRefresh the displayed data of all the references as descriptions list of this view from database.voidvoidremoveActionForProperty(String property, String qualifiedActionName) Remove an action to the property.voidremoveBlankValidValue(String property) Removed the blank option of a valid value created with addValidValue().voidremoveCollectionSumProperty(String property) voidremoveDetailAction(String qualifiedActionName) Has sense if the subview represents a collection, although always works.voidremoveListAction(String qualifiedActionName) Has sense if the subview represents a collection, although always works.voidremoveObject(String name) Remove from this view an object previously associated with @link #putObject(String, Object)voidremoveRowAction(String qualifiedActionName) removeUnavailableActionFromRow(Collection<String> rowActions, String actionArgv) voidremoveValidValue(String property, Object value) Removed a valid value previously added with addValidValue().voidreset()Clear all data and set the default values.voidvoidsetActionsNamesDetail(Collection collection) Has sense if the subview represents a collection, although always works.voidsetActionsNamesList(Collection collection) voidsetActionsNamesRow(Collection collection) voidsetActiveSection(int i) voidsetAddCollectionElementAction(String addCollectionElementAction) voidsetCollapsed(String name, boolean collapsed) voidsetCollectionColumnWidth(int columnIndex, int width) voidsetCollectionDetailVisible(boolean b) voidsetCollectionEditable(boolean b) voidsetCollectionEditingRow(int i) voidsetCollectionMembersEditables(boolean b) voidsetDefaultListActionsForCollectionsIncluded(boolean defaultListActionsForCollectionsIncluded) voidsetDefaultRowActionsForCollectionsIncluded(boolean defaultRowActionsForCollectionsIncluded) voidsetDeleteSelectedCollectionElementsAction(String deleteSelectedCollectionElementsAction) voidsetDescriptionsListCondition(String referenceName, String condition) voidsetEditable(boolean b) voidsetEditable(String name, boolean editable) To make an element of the user interface editable or not editable.voidsetEditCollectionElementAction(String editCollectionElementAction) voidvoidSets the focus in the provided propertyvoidsetFrameClosed(String frameId, boolean frameClosed) voidTo hide/show an element of the user interface.voidsetHideCollectionElementAction(String hideCollectionElementAction) voidsetKeyEditable(boolean b) voidsetLabelId(String property, String id) voidsetMemberName(String string) voidsetMessages(Messages messages) voidsetMetaMembers(Collection metaMembers) voidsetMetaPropertiesList(List<MetaProperty> metaProperties) voidThe view will be populate with data from the model object, and the model object is attached to the view.voidsetModelName(String newModel) voidsetModuleManager(ModuleManager moduleManager) voidsetNewCollectionElementAction(String newCollectionElementAction) voidsetNextCollectionElementAction(String nextCollectionElementAction) voidsetOnlyThrowsOnChange(boolean onlyThrowsOnChange) voidsetOnSelectCollectionElementAction(String onSelectCollectionElementAction) static voidsetPolisher(Object newPolisher) voidsetPreviousCollectionElementAction(String previousCollectionElementAction) voidsetPropertyPrefix(String propertyPrefix) Prefix used in HTML code for the properties of this view.static voidsetRefiner(Object newRefiner) voidsetRemoveCollectionElementAction(String removeCollectionElementAction) voidsetRemoveSelectedCollectionElementsAction(String removeSelectedCollectionElementAction) voidsetRepresentsAggregate(boolean b) voidsetRepresentsCollection(boolean b) voidsetRepresentsEntityReference(boolean b) voidsetRequest(javax.servlet.http.HttpServletRequest request) voidsetSaveCollectionElementAction(String saveCollectionElementAction) voidsetSection(boolean b) voidsetSectionEditable(String sectionName, boolean editable) voidSet the CSS style class for the specified property.voidsetSubcontrollersNamesList(Collection collection) voidsetSubview(boolean b) voidvoidsetTitleId(String id, Object... arguments) voidSet the value to the indicated member.voidsetValueNotifying(String name, Object value) Set the value and notifies the property change, recalculating all dependent properties.voidvoidsetValuesChangingModel(Map values) voidsetValuesExecutingOnChangeActions(Map values) Set the values and execute the on-change actions associated to the assigned properties.voidsetValuesNotifying(Map values) Set the values and throws are events associated to the changed values.voidsetViewCollectionElementAction(String viewCollectionElementAction) voidsetViewName(String newView) voidsetViewObject(String viewObject) The name of this view as session object.booleanthrowsPropertyChanged(String propertyName) booleanbooleantoString()booleantrySetValue(String name, Object value) Try to set the value to the indicated member.voidUpdate the model object set with setModel() from data in the view.
-
Constructor Details
-
View
public View()
-
-
Method Details
-
setRefiner
-
setPolisher
-
getMetaMembers
- Throws:
XavaException
-
setMetaMembers
-
getMetaView
- Throws:
XavaException- Since:
- 4.8.1
-
getMetaModel
- Throws:
XavaException
-
getValues
Copy of the values showed in view.It's a copy, if you change it the displayed data is not changed. If you wish change displayed data you have to use
setValuesorsetValue.- Throws:
XavaException
-
getAllValues
Copy of all values showed in view.It's a copy, if you change it the displayed data is not changed. If you wish change displayed data you have to use
setValuesorsetValue.- Throws:
XavaException
-
addValues
- Throws:
XavaException
-
setValues
- Throws:
XavaException
-
setValuesChangingModel
- Throws:
XavaException
-
getDefaultValueInElementCollection
- Since:
- 5.1
-
setValuesExecutingOnChangeActions
Set the values and execute the on-change actions associated to the assigned properties.- Throws:
XavaException
-
setValuesNotifying
Set the values and throws are events associated to the changed values.- Throws:
XavaException
-
getValue
A value from the property name. The property name can be simple: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.- Parameters:
name- Qualified properties are allowed- Throws:
XavaException
-
isMemberFromElementCollection
- Since:
- 6.2.2
-
getValueInt
- Parameters:
name- Qualified properties are allowed- Throws:
XavaException
-
getValueString
- Parameters:
name- Qualified properties are allowed- Throws:
XavaException
-
getSubview
- Throws:
XavaException
-
getGroupView
- Throws:
XavaException
-
setValueNotifying
public void setValueNotifying(String name, Object value) throws ElementNotFoundException, XavaException Set the value and notifies the property change, recalculating all dependent properties.- Parameters:
name- Can be qualified- Throws:
ElementNotFoundExceptionXavaException
-
setValue
Set the value to the indicated member.If member is not of this view an exception is thrown.
- Parameters:
name- Can be qualified- Throws:
XavaException- If name is not a displayed member of this view.
-
trySetValue
Try to set the value to the indicated member.If member does not exist in view, returns false, but it does not throw exception.
- Parameters:
name- Can be qualified- Returns:
trueif member exists and it's updated,falseotherwise.- Throws:
XavaException
-
isDataChanged
public boolean isDataChanged()- Since:
- 6.3
-
setSectionEditable
- Throws:
XavaException
-
isSectionEditable
- Throws:
XavaException
-
getKeyValuesWithValue
Excludes those values that are null, zero or empty string.- Throws:
XavaException
-
getKeyValues
- Throws:
XavaException
-
getMembersNamesWithHidden
- Throws:
XavaException
-
getMembersNames
- Throws:
XavaException
-
getCalculatedPropertiesNames
- Throws:
XavaException
-
getCollectionTab
Tabused for manage the data of this collection.This view must represents a collection in order to call this method.
- Throws:
XavaException
-
getMetaCollection
Meta data about the collection, only if this view represents a collection.- Throws:
XavaException- Since:
- 4m6
-
getCollectionValues
A list of all collection element when each element is a map with the values of the collection element.In order to call this method this view must represents a collection.
The values only include the displayed data in the row.
- Returns:
- Of type Map. Never null.
- Throws:
XavaException
-
getCollectionSize
The size of the collection.In order to call this method this view must represents a collection.
- Throws:
XavaException- Since:
- 4m5
-
getLabelDecoration
- Since:
- 5.9
-
getCollectionTotal
- Since:
- 4.3
-
getCollectionTotal
- Since:
- 4.3
-
hasCollectionTotal
public boolean hasCollectionTotal(int row, int column) - Since:
- 4.3
-
hasCollectionTotals
public boolean hasCollectionTotals()- Since:
- 5.9
-
hasCollectionSum
public boolean hasCollectionSum(int column) - Since:
- 5.9
-
getCollectionTotalsCount
public int getCollectionTotalsCount()- Since:
- 4.3
-
getTotalProperties
- Since:
- 5.9
-
addCollectionSumProperty
- Since:
- 5.9
-
removeCollectionSumProperty
- Since:
- 5.9
-
isCollectionTotalCapable
public boolean isCollectionTotalCapable(int column) -
isCollectionFixedTotal
public boolean isCollectionFixedTotal(int column) -
getCollectionTotalLabel
- Since:
- 4.3
-
getCollectionTotalPropertyName
-
isCollectionTotalEditable
public boolean isCollectionTotalEditable(int row, int column) -
getCollectionSelectedValues
A list of selected collection element when each element is a map with the values of the collection element.In order to call this method this view must represents a collection.
The values only include the displayed data in the row.
- Returns:
- Of type Map. Never null.
- Throws:
XavaException
-
getCollectionObjects
A list of all objects (POJOs or EntityBeans) in the collection.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).
- Returns:
- Never null.
- Throws:
XavaException
-
getCollectionSelectedObjects
A list of selected objects (POJOs or EntityBeans) in the collection.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).
- Returns:
- Never null.
- Throws:
XavaException
-
isCollectionFromModel
If the collection data is obtained from the model collection directly.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.- Throws:
XavaException- Since:
- 5.3
-
isCollectionCalculated
Deprecated.Since 5.3, use isCollectionFromModel() instead.If the collection represents by this view is calculated.In order to call this method this view must represents a collection.
- Throws:
XavaException
-
getMembersNamesWithoutSectionsAndCollections
- Throws:
XavaException
-
reset
Clear all data and set the default values.- Throws:
XavaException
-
getBaseModelName
If this view represent a polymorphic model, this method return the base class of the hierarchy.It can return just modelName.
- Since:
- 4.5.1
-
clear
Clear all displayed data.- Throws:
XavaException
-
isKeyEditable
public boolean isKeyEditable() -
setKeyEditable
- Throws:
XavaException
-
isEditable
If at this moment is editable. -
isEditable
If at this moment is editable. -
isEditable
- Throws:
XavaException
-
setEditable
To make an element of the user interface editable or not editable.
You can use it for properties, references (since v5.5) and collections (since v5.5). The name of the member can be qualified (since v6.2).- Parameters:
name- Name (can be qualified) of the property, reference or sectioneditable- true to make it editable, false to make it read only- Throws:
XavaException
-
isEditable
public boolean isEditable() -
setEditable
- Throws:
XavaException
-
getModelName
-
setModelName
-
assignValuesToWebView
public void assignValuesToWebView() -
throwsPropertyChanged
-
throwsPropertyChanged
- Throws:
XavaException
-
isFirstPropertyAndViewHasNoKeys
- Throws:
XavaException
-
hasKeyProperties
- Throws:
XavaException
-
findObject
Using the key values loaded in the view search the rest of the data from persistent storage and fill the view.- Throws:
Exception
-
findObject
Using the key values loaded in the view search the rest of the data from persistent storage and fill the view.- Parameters:
changedProperty- Property which change produces the search.- Returns:
- true if the object is found
- Throws:
Exception
-
findObject
public boolean findObject(MetaProperty changedProperty, Map extraKeysForSearchingReference) throws Exception Using the key values loaded in the view and the parameter map to search from persistent storage and fill the view.- Parameters:
changedProperty- Property which change produces the search.- Returns:
- true if the object is found
- Throws:
Exception- Since:
- 7.4.1
-
refresh
public void refresh()Refresh the displayed data from database. -
getModel
The model object attached to this view usingsetModel(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.- Throws:
XavaException- Since:
- 4.6
-
updateModelFromView
public void updateModelFromView()Update the model object set with setModel() from data in the view.If model is null does nothing.
- Since:
- 5.8
-
setModel
The view will be populate with data from the model object, and the model object is attached to the view.You can even assign a model of different type of the current one and the view will change its shape.
- Since:
- 4.6
-
getEntity
Entity associated to the current view.- Throws:
Exception
-
getPropertiesNamesFromStereotypesList
public Collection getPropertiesNamesFromStereotypesList(String stereotypesList) throws XavaException - Parameters:
stereotypesList- Comma separated- Throws:
XavaException
-
getMetaProperties
- Throws:
XavaException
-
getMetaProperty
- Throws:
XavaException
-
getMetaReference
- Throws:
XavaException
-
getMetaPropertiesList
- Throws:
XavaException
-
getKeyPropertiesOfReferencesEntity
- Since:
- 7.4.4
-
setMetaPropertiesList
- Throws:
XavaException
-
getPropertiesNamesFromPropertiesList
- Parameters:
propertiesList- Properties names comma separated- Throws:
XavaException
-
getViewName
-
setViewName
-
toString
-
isSubview
public boolean isSubview() -
setSubview
public void setSubview(boolean b) -
isRepresentsAggregate
public boolean isRepresentsAggregate() -
setRepresentsAggregate
public void setRepresentsAggregate(boolean b) -
getSearchAction
- Throws:
XavaException
-
isRepresentsCollection
public boolean isRepresentsCollection() -
isRepresentsSortableCollection
public boolean isRepresentsSortableCollection()- Since:
- 5.6.1
-
setRepresentsCollection
public void setRepresentsCollection(boolean b) -
displayDetailInCollection
- Throws:
XavaException
-
isCollectionDetailVisible
public boolean isCollectionDetailVisible() -
setCollectionDetailVisible
public void setCollectionDetailVisible(boolean b) -
getErrors
-
getMessages
-
setErrors
-
setMessages
- Throws:
XavaException
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest() -
setRequest
- Throws:
XavaException
-
setModuleManager
- Since:
- 7.7
-
displayAsDescriptionsList
- Throws:
XavaException
-
displayAsDescriptionsListAndReferenceView
- Throws:
XavaException
-
getDescriptionPropertyInDescriptionsList
- Throws:
XavaException
-
getDescriptionPropertiesInDescriptionsList
- Throws:
XavaException
-
throwsReferenceChanged
- Throws:
XavaException
-
getParameterValuesPropertiesInDescriptionsList
public String getParameterValuesPropertiesInDescriptionsList(MetaReference ref) throws XavaException - Throws:
XavaException
-
getFilterInDescriptionsList
- Throws:
XavaException- Since:
- 6.4
-
getConditionInDescriptionsList
- Throws:
XavaException
-
getOrderInDescriptionsList
- Throws:
XavaException
-
isOrderByKeyInDescriptionsList
- Throws:
XavaException
-
isCreateNewForReference
- Throws:
XavaException
-
isModifyForReference
- Throws:
XavaException
-
isSearchForReference
- Throws:
XavaException
-
getNewActionForReference
- Throws:
XavaException- Since:
- 7.7
-
getEditActionForReference
- Throws:
XavaException- Since:
- 7.7
-
isCreateNew
- Throws:
XavaException
-
isModify
- Throws:
XavaException
-
getNewAction
- Throws:
XavaException- Since:
- 7.7
-
getEditAction
- Throws:
XavaException- Since:
- 7.7
-
isSearch
- Throws:
XavaException
-
isLastSearchKey
- Throws:
XavaException
-
isLastSearchKey
- Throws:
XavaException
-
isRepresentsElementCollection
public boolean isRepresentsElementCollection() -
getSearchKeyName
- Since:
- 5.7.1
-
isHidden
-
setHidden
To hide/show an element of the user interface.
You can hide properties, references, collections, groups and sections.
If the name of a member and its container section or group is the same, the container section or group will be hidden. If you want to hide the member inside you should rename the group or section. The name of the member can be qualified (since v6.2).- Parameters:
name- Name (can be qualified) of the member, group or sectionhidden- true to hide, false to show- Throws:
XavaException
-
getParent
-
getRoot
-
getCollectionRootOrRoot
- Since:
- 5.8.1
-
hasSections
- Throws:
XavaException
-
displayAsDescriptionsListAndReferenceView
public boolean displayAsDescriptionsListAndReferenceView() -
displayReferenceWithNoFrameEditor
-
displayWithFrame
public boolean displayWithFrame() -
displayReferenceWithNotCompositeEditor
-
getSections
- Throws:
XavaException
-
getSectionView
- Throws:
XavaException
-
isSection
public boolean isSection() -
setSection
public void setSection(boolean b) -
getActiveSection
- Throws:
XavaException
-
setActiveSection
public void setActiveSection(int i) -
getCollectionEditingRow
public int getCollectionEditingRow() -
setCollectionEditingRow
public void setCollectionEditingRow(int i) -
getMemberName
-
setMemberName
- Throws:
XavaException
-
isCollectionMembersEditables
public boolean isCollectionMembersEditables() -
setCollectionMembersEditables
public void setCollectionMembersEditables(boolean b) -
isCollectionSortable
public boolean isCollectionSortable() -
isCollectionEditable
public boolean isCollectionEditable() -
setCollectionEditable
public void setCollectionEditable(boolean b) -
isRepresentsEntityReference
public boolean isRepresentsEntityReference() -
setRepresentsEntityReference
public void setRepresentsEntityReference(boolean b) -
getActionsNamesDetail
Has sense if the subview represents a collection, although always works. -
setActionsNamesDetail
Has sense if the subview represents a collection, although always works. -
addDetailAction
Has sense if the subview represents a collection, although always works.- Parameters:
qualifiedActionName- Qualified name (controller.action) as in controllers.xml
-
removeDetailAction
Has sense if the subview represents a collection, although always works.- Parameters:
qualifiedActionName- Qualified name (controller.action) as in controllers.xml
-
addListAction
Has sense if the subview represents a collection, although always works.- Parameters:
qualifiedActionName- Qualified name (controller.action) as in controllers.xml
-
addRowAction
-
removeRowAction
-
removeListAction
Has sense if the subview represents a collection, although always works.- Parameters:
qualifiedActionName- Qualified name (controller.action) as in controllers.xml
-
getRowActionsNames
-
isRowActionHaveIcon
-
getActionsNamesList
-
getSubcontrollersNamesList
-
hasListActions
public boolean hasListActions() -
setActionsNamesList
-
setSubcontrollersNamesList
-
setActionsNamesRow
-
getActionsNamesRow
-
getActionsNamesForProperty
- Throws:
XavaException
-
getActionsNamesForReference
public Collection<String> getActionsNamesForReference(MetaReference ref, boolean editable) throws XavaException - Throws:
XavaException
-
getActionsNamesForReference
If this is a view that represents a reference- Throws:
XavaException
-
getLabelFormatForProperty
- Throws:
XavaException
-
getLabelFormatForReference
- Throws:
XavaException
-
isSimple
public boolean isSimple()To determine what type of layout to do with flowLayout activated.- Since:
- 5.7
-
isFlowLayout
public boolean isFlowLayout() -
getDisplaySizeForProperty
- Throws:
XavaException
-
getDisplaySizeForProperty
- Throws:
XavaException
-
isFrame
- Throws:
XavaException
-
getFocusPropertyId
-
setFocus
Sets the focus in the provided property -
getEditCollectionElementAction
-
getViewCollectionElementAction
-
setEditCollectionElementAction
-
setViewCollectionElementAction
-
recalculateProperties
public void recalculateProperties() -
getLabelFor
- Throws:
XavaException
-
setLabelId
- Parameters:
property- Since v4.2 can qualified. Since v6.4 can be a group or section nameid- Id of the label from i18n files
-
isOnlyThrowsOnChange
public boolean isOnlyThrowsOnChange() -
setOnlyThrowsOnChange
public void setOnlyThrowsOnChange(boolean onlyThrowsOnChange) -
setCollectionColumnWidth
public void setCollectionColumnWidth(int columnIndex, int width) -
getCollectionColumnWidth
public int getCollectionColumnWidth(int columnIndex) -
getHideCollectionElementAction
-
setHideCollectionElementAction
-
getAddCollectionElementAction
-
getNewCollectionElementAction
-
setNewCollectionElementAction
-
getRemoveCollectionElementAction
-
setRemoveCollectionElementAction
-
getRemoveSelectedCollectionElementsAction
-
setRemoveSelectedCollectionElementsAction
-
getDeleteSelectedCollectionElementsAction
-
setDeleteSelectedCollectionElementsAction
public void setDeleteSelectedCollectionElementsAction(String deleteSelectedCollectionElementsAction) -
getSaveCollectionElementAction
-
setSaveCollectionElementAction
-
getPreviousCollectionElementAction
-
setPreviousCollectionElementAction
-
getNextCollectionElementAction
-
setNextCollectionElementAction
-
isAlignedByColumns
- Throws:
XavaException- Since:
- 5.7
-
putObject
Associates an arbitrary object to this view.This object is not used by the view for any purpose, this is only a convenience method for developer.
- Parameters:
name- The id to retrieve the object later.object- The object to associate.
-
getObject
Retrieve an object associated to this view.The object have to be associated to this view using @link #putObject(String, Object)
- Parameters:
name- Name of the object to retrieve.- Returns:
- The object, or null if it is not found.
-
removeObject
Remove from this view an object previously associated with @link #putObject(String, Object)- Parameters:
name- Name of the object to remove.
-
getChangedPropertiesActionsAndReferencesWithNotCompositeEditor
Qualified ids of the properties and references with not composite editor (that includes descriptions lists) changed in this 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.
- Returns:
- In each entry the key is the qualified id and value the container view
-
hasEditableChanged
public boolean hasEditableChanged()If the state of theeditable 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.
-
hasKeyEditableChanged
public boolean hasKeyEditableChanged()If the state of thekeyEditable 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.
-
descriptionsListsRefreshed
public boolean descriptionsListsRefreshed() -
refreshDescriptionsLists
public void refreshDescriptionsLists()Refresh the displayed data of all the references as descriptions list of this view from database. -
refreshCollections
public void refreshCollections()Refreshs the displayed data of all the collections of this view from database. -
getChangedLabels
Qualified ids of the member whose labels have changed in this 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.
- Returns:
- In each entry the key is the qualified id and value of the new label
-
getChangedCollections
Qualified ids of the collections changed in this 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.
- Returns:
- In each entry the key is the qualified id and value the container view
-
hasChangedCollections
public boolean hasChangedCollections()- Since:
- 7.6.3
-
getChangedCollectionSizesInSections
Views of sections that have collection size in the label, with the collection size.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.
- Since:
- 5.9
-
getChangedCollectionsTotals
Qualified ids of the collections totals changed in this 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.
- Returns:
- In each entry the key is the qualified id and value the container view
- Since:
- 5.1
-
getChangedCollectionsSelectedRows
Indices of selected rows of collections that has changed their selected rows but not their content.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.
- Since:
- 4.5
-
setViewObject
The name of this view as session object. -
getViewObject
The name of this view as session object. -
setPropertyPrefix
Prefix used in HTML code for the properties of this view. -
getPropertyPrefix
Prefix used in HTML code for the properties of this view. -
resetCollectionsCache
public void resetCollectionsCache() -
getChangedSectionsView
-
isReloadNeeded
public boolean isReloadNeeded() -
getQualifiedNameForDisplayedPropertyOrReferenceWithNotCompositeEditor
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.- Parameters:
name- Can be the simple or the qualified name of the member- Returns:
- The qualified name in form ModelName.memberName or null if is not a property or a reference with not composite editor.
-
propertyHasActions
If the property has actions associated to it.If the actions are showed or not in this moment has no effect in the result.
-
propertyHasActions
If the property has actions associated to it.If the actions are showed or not in this moment has no effect in the result.
-
getOnSelectCollectionElementAction
-
setOnSelectCollectionElementAction
-
isVariousCollectionsInSameLine
-
isVariousMembersInSameLine
-
isFirstInLine
-
isDefaultListActionsForCollectionsIncluded
public boolean isDefaultListActionsForCollectionsIncluded() -
setDefaultListActionsForCollectionsIncluded
public void setDefaultListActionsForCollectionsIncluded(boolean defaultListActionsForCollectionsIncluded) -
isDefaultRowActionsForCollectionsIncluded
public boolean isDefaultRowActionsForCollectionsIncluded() -
setDefaultRowActionsForCollectionsIncluded
public void setDefaultRowActionsForCollectionsIncluded(boolean defaultRowActionsForCollectionsIncluded) -
setTitleId
- Since:
- 4m1
-
getTitle
- Since:
- 4m1
-
setTitle
- Since:
- 4m1
-
getLabelStyleForProperty
- Throws:
XavaException
-
getLabelStyleForReference
- Throws:
XavaException
-
setCollapsed
-
isCollapsed
-
setFrameClosed
-
isFrameClosed
-
addActionForProperty
Add an action to the property.The action will be show even if the view or the property is not editable.
- Throws:
XavaException- Since:
- 4.5
-
removeActionForProperty
public void removeActionForProperty(String property, String qualifiedActionName) throws XavaException Remove an action to the property.Only the actions added with addActionForProperty() can be removed.
- Throws:
XavaException- Since:
- 4.5
-
propertyHasChangedActions
-
collectionDeselectAll
public void collectionDeselectAll()Deselects all items in collection -
deselectCollection
- Parameters:
as- 'ox_OpenXavaTest_CarrierWithCollectionsTogether__xava_collectionTab_fellowCarriers:1,3,2'
-
moveCollectionElement
- Throws:
Exception
-
reloadMetaModel
public void reloadMetaModel()- Since:
- 5.6
-
setAddCollectionElementAction
-
isPropertyUsedInCalculation
-
getDependentCalculationPropertiesNamesFor
-
addValidValue
Add a new valid value to a property, generating a combo in the UI for this property. For example, for a simple property like this: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.- Parameters:
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.- Since:
- 5.8
-
removeValidValue
Removed a valid value previously added with addValidValue().- Parameters:
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.- Since:
- 5.8
-
clearValidValues
Remove all the valid values previously added with addValidValue().
The property is still displayed as a combo with a sigle blank option.- Parameters:
property- The name of the property. It has to be in the model, but not in the view in this moment.- Since:
- 6.3
-
disableValidValues
Remove all the valid values previously added with addValidValue() and disable the combo.
After calling the method the property is displayed as regular text field, no longer as a combo.- Parameters:
property- The name of the property. It has to be in the model, but not in the view in this moment.- Since:
- 6.3
-
removeBlankValidValue
Removed the blank option of a valid value created with addValidValue(). By default using addValidValues() creates a combo that includes a blank option. This method removes that blank option.- Parameters:
property- The name of the property. It has to be in the model, but not in the view in this moment.- Since:
- 6.3
-
hasBlankValidValue
If the property with valid values added via addValidValue() has a blank option.- Parameters:
property- The name of the property. It has to be in the model, but not in the view in this moment.- Since:
- 6.3
-
hasValidValues
If the property has valid values associated.Valid values are added via addValidValue().
- Parameters:
property- The name of the property. It has to be in the model, but not in the view in this moment.- Since:
- 5.8
-
getValidValues
List of valid values associated to the property.Valid values are added via addValidValue().
- Parameters:
property- The name of the property. It has to be in the model, but not in the view in this moment.- Returns:
- A map with value/label pairs.
- Since:
- 5.8
-
setDescriptionsListCondition
public void setDescriptionsListCondition(String referenceName, String condition) throws XavaException - Throws:
XavaException- Since:
- 5.8
-
getDescriptionsListCondition
- Throws:
XavaException- Since:
- 5.8
-
isRepresentsEntityCollection
- Throws:
XavaException- Since:
- 7.4
-
setStyle
Set the CSS style class for the specified property.The style is the name of a CSS class that will wrap the editor of the property.
- Parameters:
propertyName- Can be qualified, for example "address.street".style- A string with the CSS class name. Can be null to remove the style.- Since:
- 7.7
-
getStyle
The CSS style class for the specified property.- Parameters:
propertyName- Can be qualified, for example "address.street".- Returns:
- The CSS class name, or null if no style has been set.
- Since:
- 7.7
-
clearStyles
public void clearStyles()Remove all CSS styles set withsetStyle(String, String).- Since:
- 7.7
-