Title: RE: error and warning messages

Yes andy, you can define as a validate=true in your struts-config.xml mapping.

Cheers
Sunil

-----Original Message-----
From: Andy Richards [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 24, 2005 8:43 PM
To: Jim Barrows
Cc: Struts Users Mailing List
Subject: Re: error and warning messages

Thanks Jim, this was along the lines off what i was thinking.

Can i not just say validate=true in my struts config for my error
validation, or must i  call super.validate  from my action form before i
do my warning logic?

cheers

Andy


Jim Barrows wrote:

>On Mon, 24 Jan 2005 13:34:50 +0000, Andy Richards <[EMAIL PROTECTED]> wrote:

>
>>Hi
>>
>>I have the requirement to perform server side validation on a form, no
>>probs. The problem is that i have a set of error rules and a set of
>>warning rules. There is no problem defining the errors in my
>>validation.xml and returning the user to the page to correct them,
>>however at some point probably when all error messages have been
>>validated i need to show warning messages. For example "value X is
>>outside of the normal range do you want to continue?" If not i want the
>>user to be able to change their value, however this then means i need to
>>do the error checking again incase the user has changed there warning
>>value to an error value!! I thought of the idea of having error rules in
>>my validation.xml and then dynamically validating the warning rules
>>progmatically in my  action (not sure if this is the best method
>>though). Has anyone come across a solution or able to think of a better
>>method of implementing this functionality.
>>   
>>
>
>Struts, I believe, has no real mechanism for warnings, so your going
>to have to put that into the session yourself.  I think the better
>place would be in the validation method of your form.
>Make sure you call super.validate.  Any errors it returns will be
>errors, then you can check for warnings, putting those messages into
>your warning attribute.
>

>
>>Many thanks
>>
>>Andy
>>
>>---------------------------------------------------------------------
>>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]

#######################################################################
# This message is intended solely for the individual or entity to     #
# which it is addressed.This communication may contain information    #
# that is proprietary,privileged or confidential and otherwise legally#
# exempt from disclosure. If you are not the named addressee, or have #
# been inadvertently referenced in the address line, you are not      #
# authorized to read, print, retain, copy or disseminate this message #
# any part of it. If you have received this message in error , please #
# notify the sender immediately by e-mail and delete all copies of    #
# the message.                                                        #
#######################################################################

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

Reply via email to