Class BeanAndProviderBoundComponentModel
- java.lang.Object
-
- com.github.bordertech.wcomponents.ComponentModel
-
- com.github.bordertech.wcomponents.DataBoundComponentModel
-
- com.github.bordertech.wcomponents.BeanAndProviderBoundComponentModel
-
- All Implemented Interfaces:
WebModel
,Externalizable
,Serializable
- Direct Known Subclasses:
AbstractInput.InputModel
,WButton.ButtonModel
,WDataTable.TableModel
,WImage.ImageModel
,WLink.LinkModel
,WPanel.PanelModel
,WProgressBar.WProgressBarModel
,WRepeater.RepeaterModel
,WTable.WTableComponentModel
,WTemplate.TemplateModel
,WText.TextModel
public class BeanAndProviderBoundComponentModel extends DataBoundComponentModel
TheComponentModel
for components that support binding to a bean either directly or through a BeanProvider. A direct binding has higher precedence than an indirect binding.- Since:
- 1.0.0
- Author:
- Yiannis Paschalidis
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.github.bordertech.wcomponents.ComponentModel
DISABLED_FLAG, ENCODE_TEXT_FLAG, FLAGS_DEFAULT, HIDE_FLAG, INITIALISED_FLAG, MANDATORY_FLAG, NAMING_CONTEXT_FLAG, READONLY_FLAG, SUBMIT_ON_CHANGE_FLAG, TRACKABLE_FLAG, USER_DATA_SET, VALIDATE_FLAG, VISIBLE_FLAG
-
-
Constructor Summary
Constructors Constructor Description BeanAndProviderBoundComponentModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
getBean()
protected Object
getBeanId()
String
getBeanProperty()
protected BeanProvider
getBeanProvider()
boolean
isSearchAncestors()
protected void
setBean(Object bean)
protected void
setBeanId(Object beanId)
void
setBeanProperty(String beanProperty)
Sets the bean property that the component is interested in.protected void
setBeanProvider(BeanProvider beanProvider)
Sets the bean provider.void
setSearchAncestors(boolean search)
-
Methods inherited from class com.github.bordertech.wcomponents.DataBoundComponentModel
getData, resetData, setData
-
Methods inherited from class com.github.bordertech.wcomponents.ComponentModel
addHtmlClass, addHtmlClass, copyData, equals, getAccessibleText, getAttribute, getAttributes, getChildren, getContextIds, getFlags, getHtmlClass, getHtmlClasses, getIdName, getLabel, getParent, getSharedModel, getTag, getTemplateMarkUp, getTemplateUrl, getToolTip, hashCode, readExternal, removeAttribute, removeHtmlClass, removeHtmlClass, setAccessibleText, setAttribute, setAttributes, setChildren, setContextIds, setFlags, setHtmlClass, setHtmlClass, setIdName, setLabel, setParent, setSharedModel, setTag, setTemplateMarkUp, setTemplateUrl, setToolTip, writeExternal
-
-
-
-
Method Detail
-
getBean
protected Object getBean()
- Returns:
- the bean.
-
setBean
protected void setBean(Object bean)
- Parameters:
bean
- the bean to set.
-
getBeanProvider
protected BeanProvider getBeanProvider()
- Returns:
- the bean provider.
-
setBeanProvider
protected void setBeanProvider(BeanProvider beanProvider)
Sets the bean provider.- Parameters:
beanProvider
- the bean provider to set.
-
getBeanId
protected Object getBeanId()
- Returns:
- the bean id.
-
setBeanId
protected void setBeanId(Object beanId)
- Parameters:
beanId
- the bean id to set.
-
getBeanProperty
public String getBeanProperty()
- Returns:
- the bean property that the component is interested in.
-
setBeanProperty
public void setBeanProperty(String beanProperty)
Sets the bean property that the component is interested in. The property is specified using Jakarta BeanUtils bean notation.- Parameters:
beanProperty
- The bean property to set.
-
isSearchAncestors
public boolean isSearchAncestors()
- Returns:
- true if search ancestors for the components bean
-
setSearchAncestors
public void setSearchAncestors(boolean search)
- Parameters:
search
- true if search ancestors for the components bean
-
-