myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grigoras Cristinel <g...@wdd.ro>
Subject Re: dynamic key generation with EL
Date Mon, 16 Oct 2006 15:10:11 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
You can look to LazyMap from org.apache.commons.collection. Is very
ease to use <br>
together with transformer.<br>
<br>
<br>
Cristi<br>
<br>
Michael Heinen wrote:
<blockquote
 cite="midE075E730CFDBAE4B86E86216721A74F2031A0A4D@VS6.EXCHPROD.USA.NET"
 type="cite">
  <pre wrap="">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 [<a class="moz-txt-link-freetext" href="mailto:martin.marinschek@gmail.com">mailto:martin.marinschek@gmail.com</a>]

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:

&lt;t:dataList var="myVar" value="#{MyBean.myList}"&gt;

&lt;h:outputText value="#{msgs['myApp.prefix'][myVar.value]}"/&gt;

regards,

Martin

On 10/16/06, Michael Heinen <a class="moz-txt-link-rfc2396E" href="mailto:mhn@recommind.com">&lt;mhn@recommind.com&gt;</a>
wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">


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:

&lt;t:dataList var="myVar" value="#{MyBean.myList}"&gt;

&lt;h:outputText value="#{msgs['myApp.prefix.'+myVar.value]}"/&gt;



Thanks for any help

Michael
    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>

Mime
View raw message