Try this maybe.  Not sure on this one.

 

<c:set var="myPageTitle" scope="request">

          <c:out value="${page.name}"/><c:out value=".title"/>

</c:set>

 

then later do

 

<h:outputText value="#{bundle[myPageTitle]}"/>

           

 

Shawn

 


From: Frank Felix Debatin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 7:24 AM
To: 'MyFaces Discussion'
Subject: RE: String concatenation in EL

 

This would have a different effect. I organized the ressources with keys such as "myPage.title".  So I would like to have

 

#{bundle[ page.name + '.title' ] } <!-- doesn't work -->

 

to be resolved to

 

#{bundle[ 'myPage.title' ] }

 

Thanks

Frank Felix

 

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 2:17 PM
To: users@myfaces.apache.org
Subject: AW: String concatenation in EL

I'm sure it would work like this:

<h:outputText value="#{ bundle[prefix] }" /> <h:outputText value="#{ bundle[key] }" />

 

But I don't know, if you would like to do it like that (because it's not a really nice solution)

 

Regards,

Andy

-----Ursprüngliche Nachricht-----
Von: Frank Felix Debatin [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 28. Februar 2006 14:15
An: 'MyFaces Discussion'
Betreff: String concatenation in EL

Hi all,

 

sorry if this question is slightly off-topic ... but maybe you have a quick answer.

 

How to concat strings in EL?

 

My goal is to write something like

 

<h:outputText value="#{ bundle[prefix+key] }" />

 

where prefix and key are string parameters. Neither plus sign nor spaces work.

 

TIA

Frank Felix


______________________________________________________________________ Diese Nachricht ist fuer die MAGNA STEYR Fahrzeugtechnik AG & Co KG rechtsunverbindlich! - This message is not legally binding upon MAGNA STEYR Fahrzeugtechnik AG & Co KG! This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. ______________________________________________________________________

****************************************************************************

This email may contain confidential
material. If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.

 ***************************************************************************

 

Reply via email to