I couldn't get the ognl call to work. I got the exception:
Method "message" failed for object
[EMAIL PROTECTED]
java.lang.NoSuchMethodException
message(java.lang.String)
Could be a 4.1.1 thing vs 4.1.2
getMessages().getMessage(String) in my java class works however, so I'll
use that.
Nick Westgate wrote:
I'm not working with T4, but if you control "value" carefully:
ognl:messages.message('message.' + value)
Cheers,
Nick.
Kolesnikov, Alexander GNI wrote:
I would actually have a method in the page class to retrieve this
message, but I wonder if something like this will work:
<span jwcid="@Insert" value="ognl:value == 1 ?
messages.message('message1') : messages.message('message2')"/>
?
-----Original Message-----
From: Paul Stanton [mailto:[EMAIL PROTECTED] Sent: 07
June 2007 09:19
To: Tapestry users
Subject: 4.1 programmatically define message key
Hi all,
<span jwcid="@If" condition="ognl:value==1">
<span jwcid="@Insert" value="message:message.1"/>
</span>
<span jwcid="@If" condition="ognl:value==2">
<span jwcid="@Insert" value="message:message.2"/>
</span>
How would I write this without the If, with just one Insert
programmatically selecting the appropriate message key?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: If you have received this email in error,
please immediately notify the sender by e-mail at the address shown.
This email transmission may contain confidential information. This
information is intended only for the use of the individual(s) or
entity to whom it is intended even if addressed incorrectly. Please
delete it from your files if you are not the intended recipient.
Thank you for your compliance. Copyright 2007 CIGNA
==============================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]