Re: validation issues when using multiple modules

2005-01-03 Thread Cliff
Hi,

I havn't use multi-module but multi-config.xml.

My setting of Validator is centralised in one config.xml.

You may try.






Good Luck.

Cliff

- Original Message - 
From: "Leigh Estes" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, January 04, 2005 8:06 AM
Subject: validation issues when using multiple modules


> No one ever responded to my follow up, so I'm trying again:
>
> It is version 1.2.4.
>
> 1) Both modules (root module and submodule) are configured as follows in
> web.xml:
>
> 
> action
> org.apache.struts.action.ActionServlet
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> config/lister
> /WEB-INF/struts-lister-config.xml
> 
> 
> debug
> 2
> 
> 
> detail
> 2
> 
> 
> validate
> true
> 
> 1
> 
>
> 2) Root module has its message resources and validation configured in
> its struts-config.xml as follows:
>
>  null="false"/>
>
> 
>  value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml"/>
> 
>
>
> 3) Submodule has its messages resources and validation configured in its
> struts-lister-config.xml as follows:
>
>  parameter="com.dchoc.toblerone.ext.lister.web.Resources" key=""
> null="false"/>
>
> 
>  value="/WEB-INF/validator-rules.xml, /WEB-INF/validation-lister.xml"/>
> 
>
> Note that null is set to false, and yet no error message appears for the
> key it doesn't seem to be able to find, just an empty string.
>
> 4) In the JSP where the action lives (an action in the submodule that is
> defined in its struts-lister-config.xml) that is configured to do the
> validation in question, html:errors is used as follows.
>
> 
>
> Note, in that same JSP, the submodule's bundle is used to print out all
> form labels and buttons with no problem as follows:
>
>cellpadding="2">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  maxlength="3"/>
> 
> 
> 
> 
> 
> 
> 
>  key="cancel"/>
> 
> 
> 
> 
> 
> 
> 
> 
>   
>
> Note that the list.size key referenced here is the same one referred to
> in the validation.xml that does not show up in the error messages, but
> it shows up just fine on this page when printed out as a form label.
>
> Any help would be most appreciated.
>
> Leigh
>
> On Mon, 2004-12-20 at 16:52, Leigh Estes wrote:
> > From: Niall Pemberton <[EMAIL PROTECTED]>
> > Subject: validation issues when using multiple modules
> > Date: Fri, 17 Dec 2004 01:40:09 -
> > Content-Type: text/plain;
> > charset="iso-8859-1"
> >
> > When you say Struts 1.2 - is that version 1.2.4?
> >
> > Can you post the relevant bits of config/code:
> >  - show how you have the message resources configured in your
struts-configs
> >  - show how your using 
> >
> > Niall
> >
> >
> > - Original Message - 
> > From: "Leigh Estes" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Friday, December 17, 2004 12:29 AM
> > Subject: validation issues when using multiple modules
> >
> >
> > > I have configured two modules in my web application using Struts 1.2.
> > > Each has its own struts config as defined in the web application's
> > > web.xml. Each has its own validation XML and resource bundles as
defined
> > > in their respective struts config files.
> > >
> > > The problem I'm seeing is that if I violate a validation rule for the
> > > root module (/), everything works as expected and I see the
appropriate
> > > error message on the page. However, if I violate a validation rule in
> > > the sub module (/app2), the validation works fine except the error
> > > message prints out without the value that should be filled in by the
> > > arg0 element for that field. In other words, instead of 'List size is
> > > required' I see 'is required', where 'List size' is the value for key
> > > 'list.size' that is defined in the resource bundle for module /app2
and
> > > is referenced by the arg0 element for the list size field. I am
> > > referencing the resource bundle for /app2 in the html:errors tag. In
> > > addition, I have tried defining list.size in the root module's
resource
> > > bundle just to verify that the problem isn't that struts is looking
> > > there for it, and that doesn't seem to be the problem because I still
> > > see the same behavior. Has anyone seen anything like this or can
anyone
> > > give me some hints as to what might be going wrong here?
> > >
> > > Thanks,
> > > Leigh
> >
> >
>
>
> -
> To unsubscribe, e

Re: validation issues when using multiple modules

2004-12-20 Thread Leigh Estes
It is version 1.2.4.

1) Both modules (root module and submodule) are configured as follows in
web.xml:


action

org.apache.struts.action.ActionServlet

config
/WEB-INF/struts-config.xml


config/lister

/WEB-INF/struts-lister-config.xml


debug
2


detail
2


validate
true

1


2) Root module has its message resources and validation configured in
its struts-config.xml as follows:








3) Submodule has its messages resources and validation configured in its
struts-lister-config.xml as follows:







Note that null is set to false, and yet no error message appears for the
key it doesn't seem to be able to find, just an empty string.

4) In the JSP where the action lives (an action in the submodule that is
defined in its struts-lister-config.xml) that is configured to do the
validation in question, html:errors is used as follows.



Note, in that same JSP, the submodule's bundle is used to print out all
form labels and buttons with no problem as follows:

  






























  

Note that the list.size key referenced here is the same one referred to
in the validation.xml that does not show up in the error messages, but
it shows up just fine on this page when printed out as a form label.

Any help would be most appreciated.

Leigh

On Mon, 2004-12-20 at 16:52, Leigh Estes wrote:
> From: Niall Pemberton <[EMAIL PROTECTED]>
> Subject: validation issues when using multiple modules
> Date: Fri, 17 Dec 2004 01:40:09 -
> Content-Type: text/plain;
>   charset="iso-8859-1"
> 
> When you say Struts 1.2 - is that version 1.2.4?
> 
> Can you post the relevant bits of config/code:
>  - show how you have the message resources configured in your struts-configs
>  - show how your using 
> 
> Niall
> 
> 
> - Original Message - 
> From: "Leigh Estes" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, December 17, 2004 12:29 AM
> Subject: validation issues when using multiple modules
> 
> 
> > I have configured two modules in my web application using Struts 1.2.
> > Each has its own struts config as defined in the web application's
> > web.xml. Each has its own validation XML and resource bundles as defined
> > in their respective struts config files.
> >
> > The problem I'm seeing is that if I violate a validation rule for the
> > root module (/), everything works as expected and I see the appropriate
> > error message on the page. However, if I violate a validation rule in
> > the sub module (/app2), the validation works fine except the error
> > message prints out without the value that should be filled in by the
> > arg0 element for that field. In other words, instead of 'List size is
> > required' I see 'is required', where 'List size' is the value for key
> > 'list.size' that is defined in the resource bundle for module /app2 and
> > is referenced by the arg0 element for the list size field. I am
> > referencing the resource bundle for /app2 in the html:errors tag. In
> > addition, I have tried defining list.size in the root module's resource
> > bundle just to verify that the problem isn't that struts is looking
> > there for it, and that doesn't seem to be the problem because I still
> > see the same behavior. Has anyone seen anything like this or can anyone
> > give me some hints as to what might be going wrong here?
> >
> > Thanks,
> > Leigh
> 
> 


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



Re: validation issues when using multiple modules

2004-12-16 Thread Niall Pemberton
When you say Struts 1.2 - is that version 1.2.4?

Can you post the relevant bits of config/code:
 - show how you have the message resources configured in your struts-configs
 - show how your using 

Niall


- Original Message - 
From: "Leigh Estes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 17, 2004 12:29 AM
Subject: validation issues when using multiple modules


> I have configured two modules in my web application using Struts 1.2.
> Each has its own struts config as defined in the web application's
> web.xml. Each has its own validation XML and resource bundles as defined
> in their respective struts config files.
>
> The problem I'm seeing is that if I violate a validation rule for the
> root module (/), everything works as expected and I see the appropriate
> error message on the page. However, if I violate a validation rule in
> the sub module (/app2), the validation works fine except the error
> message prints out without the value that should be filled in by the
> arg0 element for that field. In other words, instead of 'List size is
> required' I see 'is required', where 'List size' is the value for key
> 'list.size' that is defined in the resource bundle for module /app2 and
> is referenced by the arg0 element for the list size field. I am
> referencing the resource bundle for /app2 in the html:errors tag. In
> addition, I have tried defining list.size in the root module's resource
> bundle just to verify that the problem isn't that struts is looking
> there for it, and that doesn't seem to be the problem because I still
> see the same behavior. Has anyone seen anything like this or can anyone
> give me some hints as to what might be going wrong here?
>
> Thanks,
> Leigh
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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