Changing the code to do an 'if (data) ...' works better, except for the
first time the field gets populated. Why is it that the first time in I
would have a string value, but after that I get a boolean? What would be
the proper way to handle this?
Thanks!
On Wed, 01 Feb 2006 13:31:52 -0500, James Howe
<[EMAIL PROTECTED]> wrote:
My mistake, I was transcribing some code and I made a typo. Both
datapath items should be referring to the 'isActive' attribute. I'll
look into modifying things to see if typing is a problem.
On Wed, 01 Feb 2006 13:25:06 -0500, Dan Stowell
<[EMAIL PROTECTED]> wrote:
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
--
James Howe
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user