Package com.cmobilecom.af.model.bean
Class EntityViewConfig
- java.lang.Object
-
- com.cmobilecom.af.model.bean.ViewConfig
-
- com.cmobilecom.af.model.bean.PersistenceDataViewConfig
-
- com.cmobilecom.af.model.bean.EntityViewConfig
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class EntityViewConfig extends PersistenceDataViewConfig
EntityViewConfig: viewConfig for entity backingBean.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.cmobilecom.af.model.bean.PersistenceDataViewConfig
PersistenceDataViewConfig.LayoutDirection, PersistenceDataViewConfig.PropertyGroup
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NESTED_QUERY_RESULTS
Nested queryResults entity list ViewConfig namestatic java.lang.String
PARAM_IGNORE_QUERY_ERROR
ViewConfig parameter for query: ignore.query.error.-
Fields inherited from class com.cmobilecom.af.model.bean.PersistenceDataViewConfig
layoutType, NESTED_FOOTER_MENU, NESTED_HEADER_MENU, PARAM_ALWAYS_VISIBLE, PARAM_AUTO_COMPLETE_TOGGLE, PARAM_AUTO_FOCUS, PARAM_EXEC_ON_RETURN, PARAM_INPUT_DIALOG_TOGGLE, PARAM_RETURN_AS_TAB, PARAM_UI_AUTO_COMPLETE, PROPERTY_PROPERTIES_TO_SHOW
-
Fields inherited from class com.cmobilecom.af.model.bean.ViewConfig
accessControlAccessor, ATTR_LOCALIZED, ATTR_NAME, ATTR_VALUE, ELEMENT_VIEW_CONFIG, PROPERTY_VIEW_TYPE
-
-
Constructor Summary
Constructors Constructor Description EntityViewConfig(ViewType viewType)
Constructor with a ViewTypeEntityViewConfig(org.w3c.dom.Element viewConfigElem, ViewType defaultViewType, DataAccessUnit dataAccessUnit)
Constructor with the XML element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBeanFlowNavigation(BeanFlowNavigation beanFlowNavigation)
Add a bean flow navigationViewConfig
clone()
BeanFlowNavigation
getBeanFlowNavigation(BeanFlowNavigation.Direction direction)
Get the bean flow navigation for the directionjava.lang.Integer
getEndFormIndex()
Get end form index of entity list form beans.FormDesign
getFormDesign()
Get the FormDesign for layout of propertiesLayoutType
getLayoutType(boolean returnDefaultIfNull)
Get layoutType.EntityListViewConfig
getQueryResultsViewConfig()
Get the ViewConfig for query results.java.util.List<java.lang.String>
getQuickQueryProperties()
Get the list of properties under the quick query tab for query view.java.lang.Boolean
getShowKeywordProperties()
Whether to show the properties against which keywords will match.java.lang.Boolean
getShowSearchOptions()
Whether to show search properties?java.lang.Integer
getStartFormIndex()
Get start form index of entity list form beans.boolean
isBeanFlowEnabled()
Is bean flow enabled? If there is a BeanFlowNavigation defined for this ViewConfig, then bean flow is enabled.boolean
isPropertyTabView()
Whether the properties are layout using tab view with one tab for one property.boolean
isRestoreFormIndex()
Whether to save and restore current page(formIndex) before and after visiting entity list form beans?boolean
isShowKeywordProperties()
Whether to show the properties against which keywords will match?boolean
isShowSearchOptions()
Whether to show search properties? default is true.void
merge(ViewConfig viewConfig)
Merge the viewConfig to this ViewConfig.protected void
parseElement(org.w3c.dom.Element childElem, DataAccessUnit dataAccessUnit)
Parse ViewConfig child element.void
removeBeanFlowNavigation(BeanFlowNavigation.Direction direction)
Remove a bean flow navigationvoid
setEndFormIndex(java.lang.Integer endFormIndex)
Set end form index of entity list form beans.void
setFormDesign(FormDesign formDesign)
Set the FormDesign for layout of propertiesvoid
setFormRange(java.lang.Integer startFormIndex, java.lang.Integer endFormIndex)
Set end form index of entity list form beans.void
setQueryResultsViewConfig(EntityListViewConfig queryResultViewConfig)
Set the ViewConfig for query results.void
setQuickQueryProperties(java.lang.String... quickQueryProperties)
Set the list of properties under the quick query tab for query view.void
setQuickQueryProperties(java.util.List<java.lang.String> quickQueryProperties)
Set the list of properties under the quick query tab for query view.void
setRestoreFormIndex(java.lang.Boolean restoreFormIndex)
Set whether to save and restore formIndex(current page) before and after visiting entity list form beans.void
setShowKeywordProperties(java.lang.Boolean showKeywordProperties)
Set whether to show the properties against which keywords will match.void
setShowSearchOptions(java.lang.Boolean showSearchOptions)
Set whether to show search properties.void
setStartFormIndex(java.lang.Integer startFormIndex)
Set start form index of entity list form beans.org.w3c.dom.Element
toXMLElement(org.w3c.dom.Document document)
XML representation for viewConfig.-
Methods inherited from class com.cmobilecom.af.model.bean.PersistenceDataViewConfig
addMenuNodesDenied, addMenuNodesDenied, addMenuNodesDenied, addPropertiesToHide, addPropertiesToHide, addPropertiesToShow, addPropertiesToShow, addPropertiesToShow, addPropertyGroups, addPropertyToHide, addPropertyToShow, clearPropertiesToHide, clearPropertiesToShow, containsPropertyToHide, containsPropertyToShow, equals, getAccessibleWithoutParentBean, getDefaultPropertyDescriptor, getFooterMenuViewConfig, getFormBeanViewConfig, getFormBeanViewConfig, getHasCreatePermission, getHasDeletePermission, getHasEditPermission, getHasPermission, getHasViewPermission, getHeaderMenuViewConfig, getLayoutColumns, getLayoutDirection, getLayoutType, getManageMode, getMediaParams, getMenuNodesDenied, getMenuNodesSupported, getPropertiesToHide, getPropertiesToShow, getPropertyDescriptor, getPropertyDescriptors, getPropertyGroups, getPropertyOrDefaultDescriptor, getPropertyRequiredType, getReadOnly, getShowFooterMenu, getShowHeaderMenu, getTabView, getTabView, getThemeEnabled, isAccessibleWithoutParentBean, isMenuNodeSupported, isPrintView, isPropertyShown, isReadOnly, isShowFooterMenu, isShowHeaderMenu, isShowPrimaryProperties, isShowSamePropertyModel, isThemeEnabled, parseMediaParams, processRenderStyleElement, removeMenuNodesDenied, removeMenuNodesDenied, removeMenuNodesDenied, removePropertyToHide, removePropertyToShow, setAccessibleWithoutParentBean, setFooterMenuViewConfig, setFormBeanViewConfig, setHasCreatePermission, setHasDeletePermission, setHasEditPermission, setHasViewPermission, setHeaderMenuViewConfig, setLayoutColumns, setLayoutDirection, setLayoutType, setManageMode, setMediaParams, setMenuNodesDenied, setMenuNodesSupported, setMenuNodesSupported, setPermissions, setPrintView, setPropertiesToHide, setPropertiesToHide, setPropertiesToShow, setPropertiesToShow, setPropertyDescriptor, setPropertyEditable, setPropertyEditable, setPropertyGroups, setPropertyPriorities, setPropertyRequiredType, setReadOnly, setShowFooterMenu, setShowHeaderMenu, setShowPrimaryProperties, setTabView, setThemeEnabled
-
Methods inherited from class com.cmobilecom.af.model.bean.ViewConfig
addRedirect, containsParameter, getAccessControlAccessor, getAccessControlContext, getAccordionView, getAccordionView, getDialogView, getDialogView, getMessage, getNestedViewConfig, getNestedViewConfig, getPanelView, getPanelView, getPanelVisible, getParameter, getParameterAsBoolean, getPopupView, getPopupView, getRedirect, getRedirect, getRedirects, getStyleClass, getTitle, getViewType, isEmbeddedObject, isEntityListView, isEntityView, isMenuView, isQueryView, parseViewConfigXml, removeParameter, setAccessControlAccessor, setAccessControlContext, setAccordionView, setDialogView, setEmbeddedObject, setMessage, setNestedViewConfig, setPanelView, setPanelVisible, setParameter, setPopupView, setRedirects, setStyleClass, setTitle, setViewType
-
-
-
-
Field Detail
-
NESTED_QUERY_RESULTS
public static final java.lang.String NESTED_QUERY_RESULTS
Nested queryResults entity list ViewConfig name- See Also:
- Constant Field Values
-
PARAM_IGNORE_QUERY_ERROR
public static final java.lang.String PARAM_IGNORE_QUERY_ERROR
ViewConfig parameter for query: ignore.query.error. If set to "true", display a message instead of throwing exception if an exception is thrown in showing query results in the method ContainerBean.showQueryFormBean(Class, EntityInitializer, boolean, EntityViewConfig, List, boolean, EntityListViewConfig, QueryResultTransformer, MenuNodeFactory, DataAccessUnit)- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EntityViewConfig
public EntityViewConfig(ViewType viewType)
Constructor with a ViewType- Parameters:
viewType
- ViewType.QUERY or ViewType.ENTITY
-
EntityViewConfig
public EntityViewConfig(org.w3c.dom.Element viewConfigElem, ViewType defaultViewType, DataAccessUnit dataAccessUnit) throws ParseException, SystemException
Constructor with the XML element.- Parameters:
viewConfigElem
- the root viewConfig elementdefaultViewType
- default ViewType if not set in the XMLdataAccessUnit
- the associated DataAccessUnit- Throws:
ParseException
- throw if a parsing error occursSystemException
- throw if any other error occurs
-
-
Method Detail
-
clone
public ViewConfig clone()
- Overrides:
clone
in classPersistenceDataViewConfig
-
merge
public void merge(ViewConfig viewConfig)
Description copied from class:ViewConfig
Merge the viewConfig to this ViewConfig. Copy not-null values by references from the ViewConfig, overriding values in this ViewConfig.- Overrides:
merge
in classPersistenceDataViewConfig
- Parameters:
viewConfig
- the ViewConfig from which to copy values
-
parseElement
protected void parseElement(org.w3c.dom.Element childElem, DataAccessUnit dataAccessUnit) throws ParseException, SystemException
Parse ViewConfig child element.<viewConfig> <layoutType>TAB_VIEW</layoutType> <formDesign>FD1101</formDesign> <viewConfig name="propertyName"> .... </viewConfig> </viewConfig>
- Overrides:
parseElement
in classPersistenceDataViewConfig
- Parameters:
childElem
- a ViewConfig child elementdataAccessUnit
- the associated dataAccessUnit- Throws:
ParseException
- throw if a parsing error occursSystemException
- throw if any other error occurs
-
getLayoutType
public LayoutType getLayoutType(boolean returnDefaultIfNull)
Description copied from class:PersistenceDataViewConfig
Get layoutType.- Specified by:
getLayoutType
in classPersistenceDataViewConfig
- Parameters:
returnDefaultIfNull
- whether to return default if not set.- Returns:
- layout type
-
getShowKeywordProperties
public java.lang.Boolean getShowKeywordProperties()
Whether to show the properties against which keywords will match.- Returns:
- true for showing the keyword matching properties, false otherwise. return null if not defined.
- Since:
- 5.5
-
setShowKeywordProperties
public void setShowKeywordProperties(java.lang.Boolean showKeywordProperties)
Set whether to show the properties against which keywords will match.- Parameters:
showKeywordProperties
- true for showing the keyword matching properties
-
isShowKeywordProperties
public boolean isShowKeywordProperties()
Whether to show the properties against which keywords will match?- Returns:
- true for showing the keyword matching properties. default is false.
-
getShowSearchOptions
public java.lang.Boolean getShowSearchOptions()
Whether to show search properties?- Returns:
- true for showing search options, false otherwise. return null if not defined.
- Since:
- 5.5
-
setShowSearchOptions
public void setShowSearchOptions(java.lang.Boolean showSearchOptions)
Set whether to show search properties.- Parameters:
showSearchOptions
- true for showing search options, false otherwise. null if not defined.- Since:
- 5.5
-
isShowSearchOptions
public boolean isShowSearchOptions()
Whether to show search properties? default is true.- Returns:
- true for showing search options, false otherwise.
- Since:
- 5.5
-
getQuickQueryProperties
public java.util.List<java.lang.String> getQuickQueryProperties()
Get the list of properties under the quick query tab for query view.- Returns:
- a list of property names that can be property path such as a.b.c.
-
setQuickQueryProperties
public void setQuickQueryProperties(java.util.List<java.lang.String> quickQueryProperties)
Set the list of properties under the quick query tab for query view.- Parameters:
quickQueryProperties
- a list of property names that can be property path such as a.b.c.
-
setQuickQueryProperties
public void setQuickQueryProperties(java.lang.String... quickQueryProperties)
Set the list of properties under the quick query tab for query view.- Parameters:
quickQueryProperties
- a list of property names that can be property path such as a.b.c.
-
addBeanFlowNavigation
public void addBeanFlowNavigation(BeanFlowNavigation beanFlowNavigation)
Add a bean flow navigation- Parameters:
beanFlowNavigation
- the bean flow navigation to add
-
removeBeanFlowNavigation
public void removeBeanFlowNavigation(BeanFlowNavigation.Direction direction)
Remove a bean flow navigation- Parameters:
direction
- the direction of beanFlowNavigation to be removed
-
getBeanFlowNavigation
public BeanFlowNavigation getBeanFlowNavigation(BeanFlowNavigation.Direction direction)
Get the bean flow navigation for the direction- Parameters:
direction
- the direction of beanFlowNavigation
-
isBeanFlowEnabled
public boolean isBeanFlowEnabled()
Is bean flow enabled? If there is a BeanFlowNavigation defined for this ViewConfig, then bean flow is enabled.- Returns:
- true if bean flow is enabled, false otherwise.
-
getQueryResultsViewConfig
public EntityListViewConfig getQueryResultsViewConfig()
Get the ViewConfig for query results. It is meaningful for query view.- Returns:
- query results ViewConfig.
-
setQueryResultsViewConfig
public void setQueryResultsViewConfig(EntityListViewConfig queryResultViewConfig)
Set the ViewConfig for query results. It is meaningful for query view.- Parameters:
queryResultViewConfig
- query results ViewConfig
-
getFormDesign
public FormDesign getFormDesign()
Get the FormDesign for layout of properties- Returns:
- FormDesign object
-
setFormDesign
public void setFormDesign(FormDesign formDesign)
Set the FormDesign for layout of properties- Parameters:
formDesign
- FormDesign object
-
isPropertyTabView
public boolean isPropertyTabView()
Whether the properties are layout using tab view with one tab for one property.- Returns:
- true for tab view.
-
toXMLElement
public org.w3c.dom.Element toXMLElement(org.w3c.dom.Document document)
Description copied from class:ViewConfig
XML representation for viewConfig.- Overrides:
toXMLElement
in classPersistenceDataViewConfig
- Parameters:
document
- XML document- Returns:
- root XML element for this ViewConfig
-
getStartFormIndex
public java.lang.Integer getStartFormIndex()
Get start form index of entity list form beans.An entity can render/process a number of forms(pages) of its entity list formBeanProperties. Form ranges:
1. current form: startFormIndex=null, endFormIndex=null. 2. all forms: startFormIndex=0, endFormIndex=null. 3. form i to j-1: startFormIndex=i, endFormIndex=j.
- Returns:
- start form index
-
setStartFormIndex
public void setStartFormIndex(java.lang.Integer startFormIndex)
Set start form index of entity list form beans.An entity can render/process a number of forms(pages) of its entity list formBeanProperties. Form ranges:
1. current form: startFormIndex=null, endFormIndex=null. 2. all forms: startFormIndex=0, endFormIndex=null. 3. form i to j-1: startFormIndex=i, endFormIndex=j.
- Parameters:
startFormIndex
- start form index
-
getEndFormIndex
public java.lang.Integer getEndFormIndex()
Get end form index of entity list form beans.An entity can render/process a number of forms(pages) of its entity list formBeanProperties. Form ranges:
1. current form: startFormIndex=null, endFormIndex=null. 2. all forms: startFormIndex=0, endFormIndex=null. 3. form i to j-1: startFormIndex=i, endFormIndex=j.
- Returns:
- end form index
-
setEndFormIndex
public void setEndFormIndex(java.lang.Integer endFormIndex)
Set end form index of entity list form beans.An entity can render/process a number of forms(pages) of its entity list formBeanProperties. Form ranges:
1. current form: startFormIndex=null, endFormIndex=null. 2. all forms: startFormIndex=0, endFormIndex=null. 3. form i to j-1: startFormIndex=i, endFormIndex=j.
- Parameters:
endFormIndex
- end form index
-
setFormRange
public void setFormRange(java.lang.Integer startFormIndex, java.lang.Integer endFormIndex)
Set end form index of entity list form beans.An entity can render/process a number of forms(pages) of its entity list formBeanProperties. Form ranges:
1. current form: startFormIndex=null, endFormIndex=null. 2. all forms: startFormIndex=0, endFormIndex=null. 3. form i to j-1: startFormIndex=i, endFormIndex=j.
- Parameters:
startFormIndex
- start form index of entity list form beansendFormIndex
- end form index of entity list form beans
-
isRestoreFormIndex
public boolean isRestoreFormIndex()
Whether to save and restore current page(formIndex) before and after visiting entity list form beans?- Returns:
- true for restoring formIndex. default is false.
-
setRestoreFormIndex
public void setRestoreFormIndex(java.lang.Boolean restoreFormIndex)
Set whether to save and restore formIndex(current page) before and after visiting entity list form beans.- Parameters:
restoreFormIndex
- true for restoring formIndex
-
-