Go Back   OpenLaszlo Developers Forums > Programming in OpenLaszlo > General OpenLaszlo Programming

General OpenLaszlo Programming Questions and discussions about coding in OpenLaszlo. Please include the release of OpenLaszlo you are developing in.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-21-2007, 12:52 PM
geordie
Guest
 
Posts: n/a
Red face pathData/datapointer question

Hi all,
I wish to create a simple text string concatinated from values held within a xml file.
The xml content will contain the following

<pages>
<item>
<title>BBC News</title>
<link>http://www.bbc.co.uk/news</link>
</item>
</pages>

I wish to generate within a <text> tag with the following text.

<a href="http://www.bbc.co.uk/news" >BBC News</a>

I have created a <class> which is provided the item context of the XML document. There are many item records, so the class will be called for each row.

Currently I have the following <text> element defined.

<text name="tabName" fontsize="10" datapath="title/text()" font="vera" width="180">
<method name="applyData" args="d">
this.setText( '&lt;a href="" target="_blank"&gt;&lt;u&gt;&lt;u&gt;' + d + '&lt;/u&gt;&lt;/a&gt;' );
</method>
</text>

I wish to add the content of the link element to the href attribute. Can anyone advise me on how I may change the datapath="title/text()" to datapath="."

then within the method "applyData" reference the 'title' and 'link' elements when concatenating the string?

All help welcome.
Thanks
Reply With Quote
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:56 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.