Pretty sure you'd have to handle that yourself. It's probably cleaner to do it
in an action.

Action class:

String dbProp = ...;
MessageResources messages = getResources(request);
String message = dpProp;
if (messages.isPresent(dbProp)) {
  message = messages.getMessage(dbProp);
}
request.setAttribute("message", message);

JSP:

<bean:write name="message"/>

Or I suppose you could write your own tag...

Quoting Brian Styles <[EMAIL PROTECTED]>:

> Hi all,
> 
> I'm using the i8ln features in the struts bean tag library
> 
> I populate a form bean with info from the database, and this info acts as 
> the key in a resource bundle so that I can add a international versions 
> using
> 
> <bean:message name="form" property="database_property"/>
> 
> however, I would very much like the actual underlying property to be written
> 
> out if the key doesn't exist in the resource bundle, rather than getting the
> 
> nasty missing message key exception. Is this possible?
> 
> thanks very much,
> Brian

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to