Using Different Class Object Links for a Web Panel

6 years ago updated 6 years ago 1
Hello All,

I was working off of the lists tutorial utilizing the arstechnica datasource.
Instead of displaying the author, I have displayed the link to each article in the list. I have defined a web panel and an action to load whichever URL I click on in the list relative to each object populating the list as well as a way to return back to the list. However, When I click on a URL realtive to an object in the list, it simply only loads the last list object's URL. Can anybody help me with a technique to get this correct?

<datasource name="field" source="" query="//item" providertype="xml" parsenamespace="yes"></datasource>


<!-- styles go here -->



<class name="article-list-item">

<panel name="article-" alias="ARTICLE" width="95%" height="20%" lheight="25%" _datasourceindex="" align="center" background="#ff0000" bordercolor="00ee00" borderwidth="3">

<text name="headline" width="100%" height="50%" color="#eeeeee" font="Helvetica" size="20" align="center" valign="top" alignment="center" text=""></text>

<text name="clip" alias="CLIP" width="90%" height="50%" color="#eeeeee" font="helvetica" size="15" align="center" alignment="center" valign="bottom" text="" onclickup="web-link"></text>




<panel name="bg" width="100%" height="100%">

<panel name="list-container" alias="LIST-CONTAINER" width="100%" lwidth="95%" height="100%" align="center" clip="yes">

<list name="list" datasource="field" width="102%" lwidth="102%" height="100%" align="center" orientation="vertical" paginate="no">

<object datasourceindex="[ds:datasourceindex]" headline="[ds:title]" url="[ds:link]"></object>




<panel name="web" alias="WEBPANEL" width="100%" height="100%" ypos="0" hidden="yes">

<toolbar name="toolbar" width="100%" height="5%" align="left" valign="top">

<panel name="button" width="10%" height="80%" align="left" margin="10" valign="center" background="#888888" cornerradius="5" onclick="web-return"></panel>


<web name="web-link" alias="WEB" width="100%" height="95%" valign="bottom" url="about:blank"></web>



<action name="oninit" oninit="yes">

<assign property="datasource:field.source" value="http://feeds.arstechnica.com/arstechnica/askars?format=xml"></assign>


<action name="web-link">

<replace type="flipright" target="LIST-CONTAINER" replacement="WEBPANEL" time="1"></replace>

<load url="[object:CLIP.text]" target="WEB"></load>


<action name="web-return">

<replace type="flipleft" target="WEBPANEL" replacement="LIST-CONTAINER" time="1"></replace>

<load url="about:blank" target="WEB"></load>