On 2006-05-23, at 03:16 EDT, Adam Wolff wrote:
> I didn't look at this too carefully, but I think you want to use a
> state.
>
> <class name="survey">
> <!-- ENUM 0: foo, 1: radio, 2: freeform, -->
> <attribute name="type" type="number" value=
>
> ...
> <state name="radios" apply="${ classroot.type == 1 }"
> <radiogroup>
> ...
>
> <state name="freeform" apply="${ classroot.type == 2 }"
> <edittext/>
> ...
>
> http://www.openlaszlo.org/lps-latest/docs/reference/state.html
>
> You can data bind the type attribute (though watch out, it'll
> always be a
> string (right, Tucker?)) like this:
>
> <survey datapath="surveys/survey" type="$path{ 'question/
> @type' }">
Yes, but luckily, == converts strings to numbers when comparing a
string and a number, so your example should work.
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user