[Opensource] Question on MessageBundles and Struts validation
Peter A. Pilgrim
peterp at xenonsoft.demon.co.uk
Mon Nov 17 17:36:07 PST 2003
Eddie Lewis wrote:
> 1. Does expresso support additional message bundles?
>
> Have added to application specific struts-config.xml e.g.
> <message-resources null="false" parameter="com.cal.cp.MessagesBundle"
> key="alternate"/>
>
> How would I access this bundle through expresso? Or do I have to go
> through struts.
You would to go through Struts for extra message bundles, I am afraid.
It is not difficult if you set up resource bundle to be different name.
It should be accessible through request scope attribute. See the Struts
documentation on Jakarta for more infos.
The framework has it own notion of MessageBundles, becausse this
was created before the Struts existed. In the future it may be
possible to integrate Struts resource bundle as well because
this has been delegated to Jakarta Commons-Resources. We could make
the Expresso message bundle into a Commons Resources.
The other fly into the ointment is JSTL Resource Bundles.
>
> 2. Does expresso support apache commons validator found in struts 1.1,
> i.e. the ValidatorForm or DynaValidatorForm with declarative validation.
> Haven't been able to find any samples of this.
>
> Any help would be much appreciated
>
You should be able to use Struts Validator if you make your Expresso Controllers
ActionForms or rather ValidatorForms.
ControllerElement types should be JavaBean friendly. So you may be able to
use the Struts Validator verify the `com.jcorporate.expresso.core.controller.Input'
types. I have not checked this out myself though. YMMV
--
Peter Pilgrim
__ _____ _____ _____
/ //__ // ___// ___/ + Serverside Java
/ /___/ // /__ / /__ + Struts
/ // ___// ___// ___/ + Expresso Committer
__/ // /__ / /__ / /__ + Independent Contractor
/___//____//____//____/ + Intrinsic Motivation
On Line Resume
||
\\===> `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
More information about the Opensource
mailing list