CLONE
- static final Object
Constants for clone formats supported by Attribute.
By default attribute values returned by the get method are not cloned. However setting the attribute's "clone" property to:
- Attribute.CLONE.DEEP
- Will result in a deep cloned value being returned (using YUI's clone method). This can be expensive for complex objects.
- Attribute.CLONE.SHALLOW
- Will result in a shallow cloned value being returned (using YUI's merge method).
- Attribute.CLONE.IMMUTABLE
- Will result in a deep cloned value being returned when using the get method. Additionally users will not be able to set sub values of the attribute using the complex attribute notation (obj.set("x.y.z, 5)). However the value of the attribute can be changed, making it different from a READONLY attribute.
- Attribute.CLONE.NONE
- The value will not be cloned, resulting in a reference to the stored value being passed back, if the value is an object. This is the default behavior.