Hi Jason,
this looks great, thanks a lot, but I'm stuck again :-/
The first row of my repeater example should now be something like:
<fb:repeater id="localeRepeater"
path="java.util.Map.entrySet($myCurrentContext)">
But what to set instead of $myCurrentContext? I tried $widget, $context,
$this, $jxpathPointer ..., '.', #{.}, ${this} didn't work either.
Florian
Jason Johnston wrote:
> Dev at weitling wrote:
>> Hi Harald,
>>
>> thanks for your help, but it I'm sorry to say it doesn't match my
>> problem.
>> An example:
>> Map<String,String> locales = new HashMap<String,String>();
>> locales.put("de","deutsch");
>> locales.put("en","english");
>> locales.put("fr","francais");
>>
>> I now want a repeater binding iterating over the keys with presenting
>> the keys with their values in the template, something like (doesn't
>> work!):
>> <fb:repeater id="localeRepeater" path="locales">
>> <fb:identity>
>> <fb:value id="key" path="key"/>
>> </fb:identity>
>> <fb:on-bind>
>> <fb:value id="value" path="value"/>
>> </fb:on-bind>
>> </fb:repeater>
>>
>> Alas, Map defines methods keySet() instead of getKeySet(). entrySet()
>> returns a Set with MapEntry-objects with getKey()/getValue(), but it's
>> name should be getEntrySet(). *Argh*
>
> According to
> http://commons.apache.org/jxpath/users-guide.html#Standard_Extension_Functions
>
> JXPath allows calling Java methods directly as a standard extension to
> XPath. So IIUC you should be able to call entrySet() directly.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]