Sets an attribute of the object that contains it.
The <attribute> tag has two uses:
In a class definiiton, the <attribute> tag
defines an attribute that can be set in instances of the class.
In an instance, the <attribute> tag attaches an attribute to the instance. The attribute can be accessed from script.
See the Guide for a complete discussion.
Also see the documentation for <class> and the general description of LZX attributes. The Classes tutorial describes how
to use attributes to define a class.
| Attributes | |||||
| Name | Usage | Type (Tag) | Type (JS) | Default | Category |
| name | Tag only | token | final | ||
|
The name of the attribute. |
|||||
|
|
|||||
| required | Tag only | boolean | false | final | |
|
True if this is a required attribute. |
|||||
|
|
|||||
| setter | Tag only | script | final | ||
|
Code that is executed when setAttribute is used to set the value of this attribute. This code is executed within a context in which the variable with this attribute's name is bound to the value passed to setAttribute. |
|||||
|
|
|||||
| type | Tag only | boolean | color | expression | number | size | string | text | html | expression | final | |
|
The type of the attribute. This determines how the value is parsed. Attributes of type string are automatically quoted if when="immediate", for any other value of when, a literal string would have to be quoted to be used as a value. |
|||||
|
|
|||||
| value | Tag only | string | final | ||
|
The initial value of the attribute. The type of this value is specified by the value of the type attribute; if that attribute is not present, it's the type of this attribute in this element's tag. The attribute is given this value when the element is created. |
|||||
|
|
|||||
| when | Tag only | immediately | once | always | immediately | final | |
|
When the initial value expression is to be evaluated. One of:
when="immediately".
The setting for |
|||||
|
|
|||||
Copyright © 2002-2005 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.