PDA

View Full Version : Array attributes


sandman
04-17-2003, 01:42 PM
Is it possible to have an attribute of a class that is an array?

antun
04-17-2003, 01:55 PM
Sure. An attribute tag's type is set to expression by default, so:


<view name="myView">
<attribute name="myArr" value="new Array( 'one', 'two', 'three' )" />
</view>


-Antun

ows
04-18-2003, 04:15 PM
Or using array literal syntax:


<attribute name="myArr" value="['one', 'two', 'three']"/>