Philihp,
If you want to get accesses to the ActionErrors class "size()" method from a
JSP thru lets say JSTL. You will can extend the ActionErrors and makes the
method "getSize()". The access the ActionErrors class in the page my its
name (see http://struts.apache.org/struts-doc-1.2.x/api/index.html for name
details). Anyways I don't know it this is a possible solution to you. So
you might try the following scriptlet.
<%
int count =
((ActionErrors)
pageContext.findAttribute(org.apache.struts.Globals.ERROR_KEY)).size();
%>
Let the list know if any of this helped.
*************************************
Ruben Cepeda
[EMAIL PROTECTED]
*************************************
----Original Message Follows----
From: "Philihp Busby" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: user@struts.apache.org
Subject: Counting ActionErrors from JSP
Date: Fri, 5 May 2006 20:45:24 -0400
Hi Struts List,
Is there a way through Struts and JSTL Tags to get a "count" of the
number of ActionMessages or ActionErrors?
I would like my <html:messages> to display messages in a numbered
bulleted list when there are more than one, but just display the one
outside of a list when there is only one.
Thanks,
Philihp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]