Namespace YAHOO.util.Attribute
YAHOO.util
Provides Attribute configurations.
Defined in: tabview.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Provides Attribute configurations.
|
Field Attributes | Field Name and Description |
---|---|
<private> |
The attribute's initial configuration.
|
<private> |
Whether or not the attribute's value has been set.
|
The method to use when setting the attribute's value.
|
|
The name of the attribute.
|
|
The owner of the attribute.
|
|
Whether or not the attribute is read only.
|
|
The validator to use when setting the attribute's value.
|
|
The value of the attribute.
|
|
Whether or not the attribute can only be written once.
|
Method Attributes | Method Name and Description |
---|---|
configure(map, init)
Allows for configuring the Attribute's properties.
|
|
getValue()
Retrieves the current value of the attribute.
|
|
refresh(silent)
Resets the value to the current value.
|
|
Resets the attribute config to the initial config state.
|
|
Resets the value to the initial config value.
|
|
setValue(value, silent)
Sets the value of the attribute and fires beforeChange and change events.
|
Namespace Detail
YAHOO.util.Attribute
Provides Attribute configurations.
- Parameters:
- hash
- {Object} The intial Attribute.
- {YAHOO.util.AttributeProvider} The
- owner of the Attribute instance.
Field Detail
<private>
{Object}
_initialConfig
The attribute's initial configuration.
<private>
{Boolean}
_written
Whether or not the attribute's value has been set.
{Function}
method
The method to use when setting the attribute's value.
The method recieves the new value as the only argument.
{String}
name
The name of the attribute.
{YAHOO.util.AttributeProvider}
owner
The owner of the attribute.
{Boolean}
readOnly
Whether or not the attribute is read only.
{Function}
validator
The validator to use when setting the attribute's value.
{String}
value
The value of the attribute.
{Boolean}
writeOnce
Whether or not the attribute can only be written once.
Method Detail
configure(map, init)
Allows for configuring the Attribute's properties.
- Parameters:
- {Object} map
- A key-value map of Attribute properties.
- {Boolean} init
- Whether or not this should become the initial config.
{any}
getValue()
Retrieves the current value of the attribute.
- Returns:
- {any} The current value of the attribute.
{Boolean}
refresh(silent)
Resets the value to the current value.
Useful when values may have gotten out of sync with actual properties.
- Parameters:
- silent
- Returns:
- {Boolean} Whether or not the value was set.
resetConfig()
Resets the attribute config to the initial config state.
{Boolean}
resetValue()
Resets the value to the initial config value.
- Returns:
- {Boolean} Whether or not the value was set.
{Boolean}
setValue(value, silent)
Sets the value of the attribute and fires beforeChange and change events.
- Parameters:
- {Any} value
- The value to apply to the attribute.
- {Boolean} silent
- If true the change events will not be fired.
- Returns:
- {Boolean} Whether or not the value was set.