On Monday, September 15, 2003 at 3:22:27 PM, Ritvik wrote:
R> Hi There,
R> I am using tag at top of my page to display any
R> validation errors when a form is submitted, but for some reason, I
R> couldn't see any errors message even I have left some mandatory fields
R> blank. I am not getting a
This is some code that I used in an actionForm.
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((userId == null) || (userId.length() < 1)) {
errors.add("noUser", new ActionError
("adresses.insertUser.noUser"));
}
retur
I believe the answer to your question is that a redirect causes a new
request to be made. Because of this, the errors object in your request is
gone. It was a part of the old request. When redirect is set to false,
it's merely forwarding a request and therefore keeping all of the attributes
inta
>
> List"
>
List"
Subject: Re: html
Actualy I'm not missing the entry for the error, since it gets writen to
the page, but there are aditional "null" strings.
I have this in properties file:
text.login.password.error=Password is required
on the jsp page I have
but the output on the page is not just: "Password is required"
but
In your properties file you are missing entries for "errors" as in...
errors.header=Validation ErrorYou must
correct the following error(s) before proceeding:
errors.footer=
-Original Message-
From: Jan Fetyko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 1:51 PM
To: Struts U
Ignore what I said about the logic tags since that
doesn't tell you whether a specific field has an
error. You could use the errorsExists tag from my
Validator package if you want to though. And you
could make errorsNotExist version of the tag.
red label
David
http://home.earthlink.net/~d
You can check if there is an errors object in scope
using the logic tags to change the color of a label.
red label1
blue lable2
If you want to display the error message next to a
field, you can do this. This will display all error
messages that have
Hi - I just did this in my form.
html:errors itself doesnt do this. My actionform holds the row and column
index of my error field which are set at the of validation.
what i do is check if the error object exists and if the row and column
indices match one of the fields being displayed - the c
[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: RE: html:errors tag
The property attribute was only implemented recently. You need the 20010128
build or later for it to work.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 29
The property attribute was only implemented recently. You need the 20010128
build or later for it to work.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 29 January 2001 18:59
> To: [EMAIL PROTECTED]
> Subject: html:errors tag
>
>
>
>
> Memo from Nic
12 matches
Mail list logo