Re: Help with using ERQMListViewElement
John Pollard <[email protected]> Fri, 15 Mar 2013 16:57:45 +0000
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Many thanks for the reply.
I see the queryDictionary parameters are all tacked onto the DA URL which is what I want for some of them - thanks for that.
Is there a way to pass other parameters meant for WOHyperlink (or ERXHyperlinkResource?) to consume; the likes of escapeHtml, class, id etc.
John
> Hi John,
>
> you can combine the paramters in the queryDictionary:
>
> <wo:ERQMListView inset = "true" divider-theme = "f">
> <wo:WORepetition list = "$mylist" item = "$myitem">
> <wo:ERQMListViewElement linkResource =
> "da://DirectAction:viewPage" queryDictionary = "$znrDict" theme = "d">
> <wo:WOString value = "$myitem.name" />
> </wo:ERQMListViewElement>
> </wo:WORepetition>
> </wo:ERQMListView>
>
> public NSDictionary<String, String> znrDict()
> {
> NSMutableDictionary dict = new NSMutableDictionary();
> dict.setObjectForValue(myitem.webSiteId , "cat");
> dict.setObjectForValue(myitem.nextChildWebPageIdAndName, "site");
> return dict;
> }
>
> Stefan
>
> Am 15.03.13 14:27, schrieb John Pollard:
>> 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
>> _______________________________________________
>> Wonder-disc mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>>
>
>
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> Wonder-disc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wonder-disc
------------------------------------------------------------------------------
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