return (errors != null) is much simpler.
David
From: Mohan Radhakrishnan <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]> Subject: ActionErrors.GLOBAL_ERROR Date: Sun, 2 Mar 2003 21:29:48 +0530
Hi,
I want to show the ActionErrors.GLOBAL_ERROR only if other errors like the following are not present.
errors.add("key", new ActionError("information")); saveErrors( request, errors );
Now I am using code like this that occasionally fails
protected boolean isErrorsPresent( HttpServletRequest request ){ ActionErrors errors = ( ActionErrors )request. getAttribute( Action.ERROR_KEY ); return (errors == null) ? false : true; }
What am I doing wrong ?
Thanks, Mohan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]