Sorry I don't really understand what you're saying - you seem to be
contradicting yourself?

If you don't specify the "bundle" attribute on the <msg> element in the
validation.xml - then the <html:errors> tag on your JSP page will either use
either the "default" message resources or the "bundle" you specify on that
tag.

Niall

----- Original Message ----- 
From: "Ramesh Mohan Reddy" <[EMAIL PROTECTED]>
Sent: Wednesday, October 05, 2005 1:06 PM


> I tried this way, but it doesn't work.  The reason
> being the "bundle" attribute of <msg/> element in
> validation.xml takes precedence over "bundle"
> attribute of <html:errors/>.
>
> In my case, I have not specified "bundle" attribute
> for <msg/> element.  Hence, it will take the default
> message resources.
>
> One more thing is, I don't want to use multiple
> <form/> declarations in my validation.xml for "abc"
> customer and "xyz" customer by hardcoding "bundle"
> attribute of <msg/> element to "customer.abc" and
> "customer.xyz" respectively...
>
> --- Niall Pemberton <[EMAIL PROTECTED]>
> wrote:
>
> > Yes, you just use the "bundle" attribute on either
> > the <html:errors> or the
> > <html:messages> element:
> >
> >    <html:errors bundle="customer.abc" />
> >    <html:errors bundle="customer.xyz" />
> >
> > or
> >
> >    <html:messages bundle="customer.abc">
> >        ...
> >    </html:messages>
> >    <html:messages bundle="customer.xyz" >
> >        ...
> >    </html:messages>
> >
> > Niall
> >
> > ----- Original Message ----- 
> > From: "Ramesh Mohan Reddy" <[EMAIL PROTECTED]>
> > To: <user@struts.apache.org>
> > Sent: Wednesday, October 05, 2005 12:39 PM
> > Subject: How to provide different Validator
> > Resources
> >
> >
> > > Hi,
> > >
> > > How can I set different validator resources in
> > struts
> > > action before calling validate(...) method ?
> > >
> > > I have got one jsp and one <form/> declaration in
> > > validation.xml that are common for 2 types of
> > > customers, "abc" and "xyz".
> > >
> > > I have got message resource elements like below:-
> > >
> > > <message-resources
> > > parameter="resources.customer.default"/>
> > > <message-resources key="customer.abc"
> > > parameter="resources.customer.abc"/>
> > > <message-resources key="customer.xyz"
> > > parameter="resources.customer.xyz"/>
> > >
> > > I could achieve js validation by setting "bundle"
> > > attribute of <html:javascript/>.
> > >
> > > Does anyone know how to achieve server side
> > validation
> > > ???
> > >
> > > Thanks & Regards,
> > > Ramesh M



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

Reply via email to