You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Billerby Erik <er...@consultant.volvo.com> on 2002/09/30 14:29:01 UTC

Differences in error validation between 1.0 and 1.1b?

I have recently upgraded to struts 1.1b and I notice that all error messages stored in ActionErrors from the validate-method of the form bean has disappeared when trying to display them using <html:errors/>.

The only change I have made is upgrading struts. Something has happened. What? 

Here is my validate-code:

	public org.apache.struts.action.ActionErrors validate(
		org.apache.struts.action.ActionMapping mapping,
		javax.servlet.http.HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		request.
		if ("save".equalsIgnoreCase(action)) {
			if ("".equalsIgnoreCase(getPartNo())) {
				errors.add("partNo", new ActionError("Part.ePNOM"));
			}
		}
		
		
		return errors;
	}

In the jsp I just have:

<html:errors/>

Please help
/Erik



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


Re: Differences in error validation between 1.0 and 1.1b?

Posted by Gemes Tibor <ge...@regens.hu>.
2002. szeptember 30. 14:36 dátummal Ronald Rotteveel ezt írtad:
> Don't you have to call the method saveErrors() ?????

No. Not in the validate method. It returns ActionErrors. 

Do you have the appropriate message in your resourcebundle?

Tib

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


Re: Differences in error validation between 1.0 and 1.1b?

Posted by Ronald Rotteveel <r....@its.tudelft.nl>.
Don't you have to call the method saveErrors() ?????

Regards,

Ronald

----- Original Message -----
From: "Billerby Erik" <er...@consultant.volvo.com>
To: <st...@jakarta.apache.org>
Sent: Monday, September 30, 2002 2:29 PM
Subject: Differences in error validation between 1.0 and 1.1b?


> I have recently upgraded to struts 1.1b and I notice that all error
messages stored in ActionErrors from the validate-method of the form bean
has disappeared when trying to display them using <html:errors/>.
>
> The only change I have made is upgrading struts. Something has happened.
What?
>
> Here is my validate-code:
>
> public org.apache.struts.action.ActionErrors validate(
> org.apache.struts.action.ActionMapping mapping,
> javax.servlet.http.HttpServletRequest request) {
> ActionErrors errors = new ActionErrors();
> request.
> if ("save".equalsIgnoreCase(action)) {
> if ("".equalsIgnoreCase(getPartNo())) {
> errors.add("partNo", new ActionError("Part.ePNOM"));
> }
> }
>
>
> return errors;
> }
>
> In the jsp I just have:
>
> <html:errors/>
>
> Please help
> /Erik
>
>
>
> --
> 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>