You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Shirk <sh...@ncsa.uiuc.edu> on 2002/06/07 22:59:30 UTC

Dynamically constructing a resource key

I'm new to Struts and have been using the archives for the last few 
weeks. However, now I need some feedback.

Is there a prettier or more appropriate way of constructing or 
concatenating a string using Struts in an effort to use the constructed 
string as some key? I could only get this ugly approach to work.

<nested:define id="type" property="typeName"/>
<% String key = "type.description." + type; %>
<div class="widgetLabel"><bean:message key='<%=key%>'/></div>

Thanks very much,

Andrew


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>