Page 1 of 1

link from xml

Posted: Sat May 11, 2013 11:45 am
by Timo Sehrbruch

is it possible that i map a url retrieved from a xml file to an array of buttons?

e.g.
precode
<root>
<link>
<url>http:&#47;&#47;www&#46;google&#46;de<&#47;url>
<name>Google<&#47;name>
<&#47;link>
<link>
<url>http:&#47;&#47;www&#46;appery&#46;io<&#47;url>
<name>Appery<&#47;name>
<&#47;link>
<link>
<url>http:&#47;&#47;www&#46;some&#46;url<&#47;url>
<name>Example<&#47;name>
<&#47;link>
/code/pre
then i create an array of containers from "link" and inside is always a button which should target to "url".

in the xml mapping i can only map it to "text"-attribute of the button

thank you


link from xml

Posted: Sat May 11, 2013 12:32 pm
by Igor

Try to use List component. Put button and label to list component. Set "Visible" false on label. Map response "name" to button and "url" to label. Get label value and target to "url",
on button click event. On next tutuorial you can find how to map response to elements on list component:
http://docs.appery.io/tutorials/build...


link from xml

Posted: Sun May 12, 2013 1:52 pm
by Timo Sehrbruch

thanks for your answer. but i found a much easier method. i just used the "link" module, which i just didnt see last time.