This may be a type problem. The checkbox has a boolean value; your code
checks for the string "true". Once the checkbox calls updateData, it is
setting the attribute to a boolean value. I fail to see how the isActive
and isSubscribedTo attributes are related: maybe I'm misreading your
example.
On Wed, Feb 1, 2006 at 7:34 AM, James Howe wrote:
I have a grid control with two columns. One column contains a
checkbox and another column contains some text which varies depending
on whether the checkbox is selected or not. Both columns are tied to
a datapath. When the grid displays, the checkbox has the correct
value and the text contains the proper text for the state of the
checkbox. When I click the checkbox, the text also changes to the
correct value for the state of the checkbox. However, if I click the
checkbox again, the text does not update. My code looks like this:
<grid datapath="..." contentdatapath="details" ...>
<gridcolumn text="User">
...
<checkbox value="$path{'@isActive'}"
onclick="this.datapath.updateData()"/>
...
</gridcolumn>
<gridcolumn text="Status" ..>
<text datapath="@isSubscribedTo" resize="true">
<method name="applyData" args="data">
if (data=="true")
super.applyData("Active");
else
super.applyData("");
</method>
</text>
</gridcolumn>
</grid>
I've put a debug statement in my 'applyData' method, and it gets
called every time I click the checkbox and the data is the correct
value (true or false depending on the state of the checkbox). Why
would my text only update one time instead of every time the
applyData method is called? Am I missing something simple?
Thanks!
--
James Howe
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
Dan Stowell
Software Engineer
Laszlo Studios
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user