Help with using ERQMListViewElement
John Pollard <[email protected]> Fri, 15 Mar 2013 13:27:15 +0000
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Hi List,
In the Wonder JQueryMobile example app, I can see ERQMListViewElement is used as follows:
<wo:ERQMListView>
<wo:foreach list="$talents" item="$oneTalent">
<wo:ERQMListViewElement action="$doShowOneTalentAction">
<wo:str value = "$oneTalent.firstName" /> <wo:str value = "$oneTalent.lastName" />
</wo:ERQMListViewElement>
</wo:foreach>
</wo:ERQMListView>
In my own application, I have been able to use the ERQMListView as above, with a foreach inside, but am struggling with to use ERQMListViewElement for each link in the list.
Each of my links (within a similar loop inside ERQMListView) is currently implemented like this:
<li><webobject name="nextWebPageLink"></webobject></li>
where:
nextWebPageLink: WOHyperlink {
string = nextChildWebPage.name;
escapeHtml = false;
actionClass = "DirectAction";
?cat = nextChildWebPageIdAndName;
?site = webSite.webSiteId;
directActionName = "viewPage";
class = "subPageLink";
id = subCategoryLinkId;
title = nextChildWebPage.name;
}
i.e. I have a DirectAction to invoke, rather than a component action in the example above, with a bunch of other parameters. Am I out of luck using ERQMListViewElement because it just doesn't support all the WOHyperlink parameters (and isn't derived from it)?
I can see ERQMListViewElement has the following in the html that is generated:
<wo:if condition="$hasLinkResource">
<wo:ERXHyperlinkResource linkResource="$^linkResource" data-rel="$dataRel" queryDictionary = "$^queryDictionary">
<wo:content />
<wo:if condition="$hasSideText">
<p class="ui-li-aside"><wo:str value="$sideText" escapeHTML="false" /></p>
</wo:if>
</wo:ERXHyperlinkResource>
</wo:if>
which suggests that the linkResource parameter can be used as a URL for ERXHyperlinkResource to work from, but then could I get all the other parameters passed through to ERXHyperlinkResource?
Thanks
John
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar