You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Callaghan <gr...@hotmail.com> on 2001/12/06 02:55:32 UTC

RE: ActionError Header/Foorters - can Global vs Non-Global be dif ferentiated

Hi Jon, all

That might be the easiest way for the moment, however it doesn't provide the 
feature that the user ends back at the previous page (depending how 
important one thinks this is).

Can I assume the current struts error tags don't support what I was 
suggesting below and that if I wanted to do this I would have to make a 
modification to the struts <html:errors/> tag code?

Cheers
Greg

----Original Message Follows----
From: "Jon.Ridgway" <Jo...@upco.co.uk>
Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Subject: RE: ActionError Header/Foorters - can Global vs Non-Global be dif 
ferentiated
Date: Wed, 5 Dec 2001 09:39:09 -0000

Hi Greg,

You could try using the standard Struts ActionError's mechanism for
validation errors. Use the standard J2EE exception handling mechanism
errors.

To do this add error-page entries to your web.xml; one for exceptions and
another for warnings. Then through two types of corresponding user-defined
exceptions from your code.

Jon.

-----Original Message-----
From: Greg Callaghan [mailto:greg_callaghan@hotmail.com]
Sent: 05 December 2001 07:26
To: struts-user@jakarta.apache.org
Subject: ActionError Header/Foorters - can Global vs Non-Global be
differentiated

Hi,

Noting that one may use an ActionError, and struts ErrorTag to display both
GLOBAL and validation errors (non-GLOBAL).

Currently the header/footer text I use is focused on the non-Global errors
(ie validation errors in a form).  Is there a way with struts to throw the
errors back such that it would be more like the following -:

* Global Error1 (eg for resource not available error)
* Global Error1

<Error.Header> eg correct validation errors in form before proceeding
* Validation Error 1 - date should be in dd/mm/yyyy format
* Validation Error 2
<Error.Footer>

Regards
Greg



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   
<ma...@jakarta.apache.org>
For additional commands, e-mail: 
<ma...@jakarta.apache.org>



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: ActionError Header/Foorters - can Global vs Non-Global be dif ferentiated

Posted by David Winterfeldt <dw...@yahoo.com>.
I'm not 100% sure if this is what you are asking
about, but the Validator Framework has the concept of
levels of validation errors.  You can setup a
validator to depends on another one.  The 'minlength'
validator depends on the 'required' validator.  So
until this level (required) is completed, the next
level will not occur.

<validator name="required"
        
classname="com.wintecinc.struts.validation.StrutsValidator"
         method="validateRequired"
         msg="errors.required">

<validator name="minlength"
        
classname="com.wintecinc.struts.validation.StrutsValidator"
         method="validateMinLength"
         depends="required"
         msg="errors.minlength">


You can find the framework in the Struts nightly
builds in the contrib/validator directory or at the
url below.

http://home.earthlink.net/~dwinterfeldt/

David

--- Greg Callaghan <gr...@hotmail.com> wrote:
> Hi Jon, all
> 
> That might be the easiest way for the moment,
> however it doesn't provide the 
> feature that the user ends back at the previous page
> (depending how 
> important one thinks this is).
> 
> Can I assume the current struts error tags don't
> support what I was 
> suggesting below and that if I wanted to do this I
> would have to make a 
> modification to the struts <html:errors/> tag code?
> 
> Cheers
> Greg
> 
> ----Original Message Follows----
> From: "Jon.Ridgway" <Jo...@upco.co.uk>
> Reply-To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> To: "'Struts Users Mailing List'"
> <st...@jakarta.apache.org>
> Subject: RE: ActionError Header/Foorters - can
> Global vs Non-Global be dif 
> ferentiated
> Date: Wed, 5 Dec 2001 09:39:09 -0000
> 
> Hi Greg,
> 
> You could try using the standard Struts
> ActionError's mechanism for
> validation errors. Use the standard J2EE exception
> handling mechanism
> errors.
> 
> To do this add error-page entries to your web.xml;
> one for exceptions and
> another for warnings. Then through two types of
> corresponding user-defined
> exceptions from your code.
> 
> Jon.
> 
> -----Original Message-----
> From: Greg Callaghan
> [mailto:greg_callaghan@hotmail.com]
> Sent: 05 December 2001 07:26
> To: struts-user@jakarta.apache.org
> Subject: ActionError Header/Foorters - can Global vs
> Non-Global be
> differentiated
> 
> Hi,
> 
> Noting that one may use an ActionError, and struts
> ErrorTag to display both
> GLOBAL and validation errors (non-GLOBAL).
> 
> Currently the header/footer text I use is focused on
> the non-Global errors
> (ie validation errors in a form).  Is there a way
> with struts to throw the
> errors back such that it would be more like the
> following -:
> 
> * Global Error1 (eg for resource not available
> error)
> * Global Error1
> 
> <Error.Header> eg correct validation errors in form
> before proceeding
> * Validation Error 1 - date should be in dd/mm/yyyy
> format
> * Validation Error 2
> <Error.Footer>
> 
> Regards
> Greg
> 
> 
> 
>
_________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 
> 
>
_________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>