| java.lang.Object java.beans.FeatureDescriptor com.sun.rave.designtime.markup.AttributeDescriptor
AttributeDescriptor | public class AttributeDescriptor extends FeatureDescriptor (Code) | | An AttributeDescriptor describes a markup attribute that is used to persist the value of a
JavaBean property. The AttributeDescriptor is "stuffed" into the PropertyDescriptor using the
name-value pair storage: FeatureDescriptor.setValue(String key, Object value). The key is
defined by Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, or literally "attributeDescriptor".
If an AttributeDescriptor is found in a property's PropertyDescriptor, the IDE will persist any
property settings in the .jsp file as an attribute. If no AttributeDescriptor is found, any
property settings will be persisted in the .java file as standard JavaBeans properties. For
example, a property called 'background' of type 'java.awt.Color' might be persisted in
two ways:
- If it has an AttributeDescriptor, it will be persisted as a markup attribute, like
this:
background="#FFFFFF"
- If there is no AttributeDescriptor, it will be persisted as a property setter method call,
like this:
setBackground(new java.awt.Color(255, 255, 255));
author: Joe Nuxoll version: 1.0 See Also: java.beans.FeatureDescriptor.setValue(StringObject) See Also: com.sun.rave.designtime.Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR
|
bindable | protected boolean bindable(Code) | | protected storage for the 'bindable' property
|
defaultValue | protected String defaultValue(Code) | | protected storage for the 'defaultValue' property
|
required | protected boolean required(Code) | | protected storage for the 'required' property
|
AttributeDescriptor | public AttributeDescriptor()(Code) | | Constructs an empty AttributeDescriptor
|
AttributeDescriptor | public AttributeDescriptor(String attributeName)(Code) | | Constructs an AttributeDescriptor with the specified attributeName
Parameters: attributeName - The desired attribute name |
AttributeDescriptor | public AttributeDescriptor(String attributeName, boolean required, String defaultValue)(Code) | | Constructs an AttributeDescriptor with the specified attributeName, required state, and
default value
Parameters: attributeName - The desired attribute name Parameters: required - true if this is a required attribute, false if not Parameters: defaultValue - The default value for this attribute (will not be persisted if theset value matches the default value) |
AttributeDescriptor | public AttributeDescriptor(String attributeName, boolean required, String defaultValue, boolean bindable)(Code) | | Constructs an AttributeDescriptor with the specified attributeName, required state, default
value, and bindable state
Parameters: attributeName - The desired attribute name Parameters: required - true if this is a required attribute, false if not Parameters: defaultValue - The default value for this attribute (will not be persisted if theset value matches the default value) Parameters: bindable - true if this property is 'bindable', meaning it can have a valueexpression set on it, or false if not |
getDefaultValue | public String getDefaultValue()(Code) | | Gets the 'defaultValue' property. The default value is the value that this property has if
it is not set at all - thus when the value is explicitly set to the default, the property
setting is removed from the persistence.
the 'defaultValue' property setting |
isBindable | public boolean isBindable()(Code) | | Gets the 'bindable' property. A 'bindable' property is one that may have a value binding
expression as its value.
true if this attribute should be bindable, false if not |
isRequired | public boolean isRequired()(Code) | | Gets the 'required' property. A required attribute is one that must have a setting in order
to produce valid JSP.
the current state of the 'required' property |
setBindable | public void setBindable(boolean bindable)(Code) | | Sets the 'bindable' property. A 'bindable' property is one that may have a value binding
expression as its value.
Parameters: bindable - true if this attribute should be bindable, false ifnot |
setDefaultValue | public void setDefaultValue(String defaultValue)(Code) | | Sets the 'defaultValue' property. The default value is the value that this property has if
it is not set at all - thus when the value is explicitly set to the default, the property
setting is removed from the persistence.
Parameters: defaultValue - The default value for this attribute (will not be persisted if the setvalue matches the default value) |
setRequired | public void setRequired(boolean required)(Code) | | Sets the 'required' property. A required attribute is one that must have a setting in order
to produce valid JSP.
Parameters: required - true if this attribute should be required, false ifnot |
|
|