<[EMAIL PROTECTED]> wrote:

[...]
 
> What I'd like to do is something like:
> 
> <bean:message key="term.type<%=bean.getType()%>"/>
> 
> Of course, this doesn't work. So what I am actually doing is
> adding a new method to the bean which duplicates the code
> in <bean:message> so that the bean can do the mapping for me.
> I then display the string with:
> 
> <%= line.getTypeMessage(pageContext) %>

You can try this:

<bean:message key = '<%= "term.type" + bean.getType() %>' />

or, better (does not work with struts 1.0 but with CVS 1.1)

<bean:message name="yourBean" property="typeKey" />

if your bean is named "yourBean" and has a property 

String getTypeKey() {
    return "term.type" + getType();
}


--
gR


Reply via email to