|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openxava.view.View
public class View
Session object to manage a view based in maps, hence suitable for OpenXava
| Constructor Summary | |
|---|---|
View()
|
|
| Method Summary | |
|---|---|
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 |
addValues(java.util.Map map)
|
void |
assignValuesToWebView()
|
void |
assignValuesToWebView(java.lang.String qualifier)
|
void |
clear()
Clear all displayed data. |
boolean |
displayAsDescriptionsList(MetaReference ref)
|
boolean |
displayDetailInCollection(java.lang.String collectionName)
|
void |
findObject()
Using the key values loaded in the view search the rest of the data from persistent storage and fill the view. |
void |
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()
|
int |
getActiveSection()
|
java.util.Map |
getAllValues()
Copy of all values showed in view. |
java.util.Map |
getCalculatedPropertiesNames()
|
java.util.Map |
getChangedCollections()
Qualified ids of the collections changed in this request. |
java.util.Map |
getChangedLabels()
Qualified ids of the member whose labels have changed in this request. |
java.util.Map |
getChangedPropertiesActionsAndDescriptionsListReferences()
Qualified ids of the properties and references as descriptions lists changed in this request. |
View |
getChangedSectionsView()
|
int |
getCollectionEditingRow()
|
java.util.List |
getCollectionObjects()
A list of all objects (POJOs or EntityBeans) in the collection. |
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. |
Tab |
getCollectionTab()
Tab used for manage the data of this collection. |
java.util.List |
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.String |
getDescriptionPropertiesInDescriptionsList(MetaReference ref)
|
java.lang.String |
getDescriptionPropertyInDescriptionsList(MetaReference ref)
|
int |
getDisplaySizeForProperty(MetaProperty p)
|
java.lang.String |
getEditCollectionElementAction()
|
Messages |
getErrors()
|
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 |
getLabelFor(MetaMember p)
|
int |
getLabelFormatForProperty(MetaProperty p)
|
int |
getLabelFormatForReference(MetaReference ref)
|
java.lang.String |
getMemberName()
|
java.util.Map |
getMembersNames()
|
java.util.Map |
getMembersNamesWithHidden()
|
Messages |
getMessages()
|
java.util.Collection |
getMetaMembers()
|
MetaModel |
getMetaModel()
|
java.util.List |
getMetaProperties()
|
java.util.Collection |
getMetaPropertiesList()
|
MetaProperty |
getMetaProperty(java.lang.String name)
|
MetaReference |
getMetaReference(java.lang.String name)
|
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 |
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 |
getQualifiedNameForDisplayedPropertyOrDescriptionsListReference(java.lang.String name)
If the property or the reference as descriptions list 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.lang.String |
getSaveCollectionElementAction()
|
java.lang.String |
getSearchAction()
|
java.util.List |
getSections()
|
View |
getSectionView(int index)
|
View |
getSubview(java.lang.String name)
|
java.lang.Object |
getValue(java.lang.String 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 |
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 |
isAlignedByColumns()
|
boolean |
isCollectionCalculated()
If the collection represents by this view is calculated. |
boolean |
isCollectionDetailVisible()
|
boolean |
isCollectionEditable()
|
boolean |
isCollectionMembersEditables()
|
boolean |
isCreateNew()
|
boolean |
isCreateNewForReference(MetaReference ref)
|
boolean |
isDetailMemberInCollection()
|
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 |
isFirstPropertyAndViewHasNoKeys(MetaProperty pr)
|
boolean |
isFrame()
|
boolean |
isHidden(java.lang.String name)
|
boolean |
isKeyEditable()
|
boolean |
isLastSearchKey(MetaProperty p)
|
boolean |
isLastSearchKey(java.lang.String propertyName)
|
boolean |
isModify()
|
boolean |
isModifyForReference(MetaReference ref)
|
boolean |
isOnlyThrowsOnChange()
|
boolean |
isOrderByKeyInDescriptionsList(MetaReference ref)
|
boolean |
isReloadNeeded()
|
boolean |
isRepresentsAggregate()
|
boolean |
isRepresentsCollection()
|
boolean |
isRepresentsEntityReference()
|
boolean |
isSearch()
|
boolean |
isSearchForReference(MetaReference ref)
|
boolean |
isSection()
|
boolean |
isSectionEditable(java.lang.String sectionName)
|
boolean |
isSubview()
|
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. |
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 |
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 |
reset()
Clear all data and set the default values. |
void |
setActionsNamesDetail(java.util.Collection collection)
Has sense if the subview represents a collection, although always works. |
void |
setActionsNamesList(java.util.Collection collection)
|
void |
setActiveSection(int i)
|
void |
setCollectionDetailVisible(boolean b)
|
void |
setCollectionEditable(boolean b)
|
void |
setCollectionEditingRow(int i)
|
void |
setCollectionMembersEditables(boolean b)
|
void |
setEditable(boolean b)
|
void |
setEditable(java.lang.String name,
boolean 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 |
setHidden(java.lang.String name,
boolean hidden)
|
void |
setHideCollectionElementAction(java.lang.String hideCollectionElementAction)
|
void |
setKeyEditable(boolean b)
|
void |
setLabelId(java.lang.String propertyName,
java.lang.String id)
|
void |
setMemberName(java.lang.String string)
|
void |
setMessages(Messages messages)
|
void |
setMetaMembers(java.util.Collection metaMembers)
|
void |
setModelName(java.lang.String newModel)
|
void |
setNewCollectionElementAction(java.lang.String newCollectionElementAction)
|
void |
setOnlyThrowsOnChange(boolean onlyThrowsOnChange)
|
void |
setPropertyPrefix(java.lang.String propertyPrefix)
Prefix used in HTML code for the properties of this view. |
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 |
setSubview(boolean b)
|
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 map)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public View()
| Method Detail |
|---|
public java.util.Collection getMetaMembers()
throws XavaException
XavaExceptionpublic void setMetaMembers(java.util.Collection metaMembers)
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 map)
throws XavaException
XavaException
public void setValues(java.util.Map map)
throws XavaException
XavaException
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
name - Qualified properties are allowed
XavaException
public int getValueInt(java.lang.String name)
throws XavaException
name - Qualified properties are allowed
XavaException
public java.lang.String getValueString(java.lang.String name)
throws XavaException
name - Qualified properties are allowed
XavaException
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 qualified
ElementNotFoundException
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 qualified
XavaException - 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 qualified
true if member exists and it's updated, false otherwise.
XavaException
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 java.util.List 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 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 isCollectionCalculated()
throws XavaException
In order to call this method this view must represents a collection.
XavaException
public boolean isDetailMemberInCollection()
throws XavaException
XavaException
public void reset()
throws XavaException
XavaException
public void clear()
throws XavaException
XavaExceptionpublic boolean isKeyEditable()
public void setKeyEditable(boolean b)
throws XavaException
XavaExceptionpublic 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
XavaExceptionpublic boolean isEditable()
public void setEditable(boolean b)
throws XavaException
XavaExceptionpublic java.lang.String getModelName()
public void setModelName(java.lang.String newModel)
public void assignValuesToWebView()
public void assignValuesToWebView(java.lang.String qualifier)
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 void findObject(MetaProperty changedProperty)
throws java.lang.Exception
changedProperty - Property which change produces the search.
java.lang.Exceptionpublic void refresh()
public java.util.Collection getPropertiesNamesFromStereotypesList(java.lang.String stereotypesList)
throws XavaException
stereotypesList - Comma separated
XavaException
public java.util.List 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.Collection getMetaPropertiesList()
throws XavaException
XavaException
public java.util.Collection getPropertiesNamesFromPropertiesList(java.lang.String propertiesList)
throws XavaException
propertiesList - Properties names comma separated
XavaExceptionpublic java.lang.String getViewName()
public void setViewName(java.lang.String newView)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isSubview()
public void setSubview(boolean b)
public boolean isRepresentsAggregate()
public void setRepresentsAggregate(boolean b)
public java.lang.String getSearchAction()
throws XavaException
XavaExceptionpublic boolean isRepresentsCollection()
public void setRepresentsCollection(boolean b)
public boolean displayDetailInCollection(java.lang.String collectionName)
throws XavaException
XavaExceptionpublic 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
XavaExceptionpublic HttpServletRequest getRequest()
public void setRequest(HttpServletRequest request)
throws XavaException
XavaException
public boolean displayAsDescriptionsList(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 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
XavaExceptionpublic boolean isHidden(java.lang.String name)
public void setHidden(java.lang.String name,
boolean hidden)
throws XavaException
XavaExceptionpublic View getParent()
public View getRoot()
public boolean hasSections()
throws XavaException
XavaException
public java.util.List getSections()
throws XavaException
XavaException
public View getSectionView(int index)
throws XavaException
XavaExceptionpublic boolean isSection()
public void setSection(boolean b)
public int getActiveSection()
throws XavaException
XavaExceptionpublic 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
XavaExceptionpublic boolean isCollectionMembersEditables()
public void setCollectionMembersEditables(boolean b)
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.actio