Hi,

You can look to LazyMap from org.apache.commons.collection. Is very ease to use
together with transformer.


Cristi

Michael Heinen wrote:
Thanks Martin,
This could really work with a custom Map implementation.
I hoped for a simpler solution but the EL is really a little bit
limited.

Michael

-----Original Message-----
From: Martin Marinschek [mailto:[EMAIL PROTECTED]] 
Sent: Montag, 16. Oktober 2006 13:07
To: MyFaces Discussion
Subject: Re: dynamic key generation with EL

Interesting. No, I don't think it would work.

option would be two use a double-indexed map (you'd have to change to
an implementation of map which returns a map then, and this map would
get the second argument passed in).

your example changed to the new approach:

<t:dataList var="myVar" value="#{MyBean.myList}">

<h:outputText value="#{msgs['myApp.prefix'][myVar.value]}"/>

regards,

Martin

On 10/16/06, Michael Heinen <[EMAIL PROTECTED]> wrote:
  


Hi,



I have to create a message key dynamically in JSP.

How can I do this with EL and concat expressions?



I have the prefix 'myApp.prefix.' and want to add a value at the end.



The following sample does not work:

<t:dataList var="myVar" value="#{MyBean.myList}">

<h:outputText value="#{msgs['myApp.prefix.'+myVar.value]}"/>



Thanks for any help

Michael
    


  

Reply via email to