public class BindingInfo extends UifDictionaryBeanBase implements Serializable
From the binding configuration the binding path is determined (if not manually set) and used to set the path in the UI or to get the value from the model
componentCode, namespaceCode| Constructor and Description | 
|---|
| BindingInfo() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addToBindByNamePrefix(String bindPrefix)Helper method for adding a path to the binding prefix | 
| String | getBindByNamePrefix()Prefix that will be used to form the binding path from the component
 name. | 
| String | getBindingName()Gives the name of the property that the component binds to. | 
| String | getBindingObjectPath()For attribute fields that do not belong to the default form object (given
 by the view), this field specifies the path to the object (on the form)
 the attribute does belong to. | 
| String | getBindingPath()Path to the property on the model the component binds to. | 
| String | getBindingPathPrefix()Returns the binding path prefix to affix before the binding path or property adjusted binding path. | 
| String | getBindingPrefixForNested()Returns the binding prefix string that can be used to setup the binding
 on  DataBindingcomponents that are children of the component
 that contains theBindingInfo. | 
| String | getCollectionPath()If field is part of a collection field, gives path to collection | 
| String | getPropertyAdjustedBindingPath(String propertyPath)Returns the binding path that is formed by taking the binding configuration
 of this  BindingInfoinstance with the given property path as the
 binding name. | 
| boolean | isBindToForm()Indicates whether the component binds directly to the form (that is its
 bindingName gives a property available through the form), or whether is
 binds through a nested form object. | 
| boolean | isBindToMap()Indicates whether the parent object for the property that we are binding
 to is a Map. | 
| void | setBindByNamePrefix(String bindByNamePrefix)Setter for the prefix to use for forming the binding path by name | 
| void | setBindingName(String bindingName)Setter for the bind property name | 
| void | setBindingObjectPath(String bindingObjectPath)Setter for the object path on the form | 
| void | setBindingPath(String bindingPath)Setter for the binding path. | 
| void | setBindToForm(boolean bindToForm)Setter for the bind to form indicator | 
| void | setBindToMap(boolean bindToMap)Setter for the bind to map indicator | 
| void | setCollectionPath(String collectionPath)Setter for the field's collection path (if part of a collection) | 
| void | setDefaults(View view,
                      String propertyName)Sets up some default binding properties based on the view configuration
 and the component's property name | 
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsclone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdataDictionaryPostProcessing, getComponentCode, getNamespaceCodepublic BindingInfo()
public void setDefaults(View view, String propertyName)
Sets the bindingName (if not set) to the given property name, and if the binding object path has not been set uses the default binding object path setup for the view
view - the view instance the component belongs topropertyName - name of the property (relative to the parent object) the component binds topublic String getBindingPath()
e.g. Property name 'foo' on a model would have binding path "foo", while property name 'name' of the nested model property 'account' would have binding path "account.name"
public String getBindingPrefixForNested()
DataBinding components that are children of the component
 that contains the BindingInfo. The binding prefix is formed
 like the binding path but without including the object pathpublic String getPropertyAdjustedBindingPath(String propertyPath)
BindingInfo instance with the given property path as the
 binding name. This can be used to get the binding path when just a property
 name is given that is assumed to be on the same parent object of the field with
 the configured binding info
 Special check is done for org.kuali.rice.krad.uif.UifConstants#NO_BIND_ADJUST_PREFIX prefix on the property name which indicates the property path is the full path and should not be adjusted. Also, if the property is prefixed with org.kuali.rice.krad.uif.UifConstants#FIELD_PATH_BIND_ADJUST_PREFIX, this indicates we should only append the binding object path
propertyPath - path for property to return full binding path forpublic String getBindingPathPrefix()
public void addToBindByNamePrefix(String bindPrefix)
bindPrefix - path to addpublic void setBindingPath(String bindingPath)
bindingPath - public boolean isBindToForm()
public void setBindToForm(boolean bindToForm)
bindToForm - public String getBindingName()
If blank this will be set from the name field of the component
public void setBindingName(String bindingName)
bindingName - public String getBindByNamePrefix()
public void setBindByNamePrefix(String bindByNamePrefix)
bindByNamePrefix - public String getCollectionPath()
This is used for metadata purposes when getting finding the attribute definition from the dictionary and is not used in building the final binding path
public void setCollectionPath(String collectionPath)
collectionPath - public String getBindingObjectPath()
 e.g. Say we have an attribute field with property name 'number', that
 belongs to the object given by the 'account' property on the form. The
 form object path would therefore be set to 'account'. If the property
 belonged to the object given by the 'document.header' property of the
 form, the binding object path would be set to 'document.header'. Note if
 the binding object path is not set for an attribute field (or any
 DataBinding component), the binding object path configured
 on the View will be used (unless bindToForm is set to true,
 where is assumed the property is directly available from the form).
 
public void setBindingObjectPath(String bindingObjectPath)
bindingObjectPath - public boolean isBindToMap()
public void setBindToMap(boolean bindToMap)
bindToMap - Copyright © 2005–2015 The Kuali Foundation. All rights reserved.