I seem to be getting the data that I want but for some reason I can't seem
to change the text that is displayed by the text view. I've put debug
statements in my if statement and I'm getting to the code which does
either this.setText("Subscribed") or this.setText("") but the text never
changes.
On Wed, 25 Jan 2006 12:33:08 -0500, Bryan Barkley <[EMAIL PROTECTED]>
wrote:
I think you want something like
if (datapath.getNodeAttribute('isSubscribed') == 'true')
- Bryan
On 1/25/06, James Howe <[EMAIL PROTECTED]> wrote:
I have a text view which is associated with an attribute value from an
XML
dataset. The attribute in question has a value of "true" or "false". I
don't want to display "true" or "false", I want to display another
string
value based on whether the attribute is true or false. So far I haven't
been able to get my value to display, the text field always displays
'true' or 'false'. Some partial code that I'm currently using is:
<gridcolumn text="Status" width="100" resizemargin="1"
resizable="false">
<text width="${parent.width}" font="Arial"
datapath="@isSubscribed">
<method event="ondata">
if (... == "true") { <--- Not sure what to do
here
this.setText("Subscribed");
}
else
this.setText("");
</method>
</datapath>
</text>
</gridcolumn>
The XML looks something like this:
<items>
<item isSubscribed="true"/>
<item isSubscribed="false"/>
...
</items>
The grid to which this gridcolumn belongs has a datapath of "items" and
a
contentdatapath of "item". I'm getting the rows I expect, but no matter
what I do, I can't get the text of this column to change. It always
displays as 'true' or 'false.' What am I doing wrong?
Thanks.
--
James Howe
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
--
James Howe
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user