Your method is operating on a textlistitem, not actual text.

I think what you want is "this._title.setAttribute("fontstyle", "bold");


On 12/16/05, James Howe <[EMAIL PROTECTED]> wrote:
I have a list which is displaying some textlistitems based on information
extracted from some XML data.  Depending on the information in the XML, I
may want an individual textlistitem to display as bold or not.  I've tried
doing the following, but didn't get the result I was hoping for:

    <textlistitem datapath="somedata">
       <method event="ondata">
          <![CDATA[
             var textToDisplay =
this.datapath.xpathQuery("someElement/text()");
             if (someTest) {
                // this.setAttribute("fontstyle", "bold");   <-- I tried
this both ways
                 this.fontstyle = "bold";
             }
             this.setAttribute("text", textToDisplay);
           ]]>
      </method>
    </textlistitem>

No matter what I tried, the information was never bolded.  The only way I
could get bold text was to specify a fontstyle="bold" on the textlistitem
tag itself.  Of course, this makes every item bold, which isn't what I
want.  I also know that the code inside of 'someTest' is being reached.  I
even tried setting the fontstyle outside of the 'if', and that made no
difference either.

Can someone tell me what I'm doing wrong?

Thanks!

--
James Howe
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to