struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cosyns Xavier" <xcos...@noctis.be>
Subject How appropriately access message-resources from Form classes??
Date Fri, 04 Jun 2004 09:22:59 GMT
Hi,

I want to do some custom validation inside my ValidatorForm but
encountered some problems in displaying in a 'struts-recommended way' my
error messages.

>From inside a ValidatorForm I can not find a way to access the resource
bundles configured in the struts config file. I need it because I want
to create an actionError with internationalized arguments.

Something like this:
ActionError("my.error.key", getResourceValue("my.first.arg.key"),
getResourceValue("my.second.arg.key"));

But I do not know how to access my properties in a 'struts' way inside
my ValidatorForm.

With Action there are no problems as we have a getResources() method.

Does anyone have some idea about this,

Thanks,

Cosyns Xavier, 
______________________________ 
xcosyns@inveo.be 
 
InveO Consulting & Development
Av. E. de Beco 112
1050 Ixelles 
Tel: +32 2 648 74 32 
Fax: +32 2 648 87 64 




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message