You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wendy Smoak <We...@asu.edu> on 2004/03/05 23:37:56 UTC
Header for errors (no HTML in the .properties file)
I'm using this to display errors:
<div class="error">
<ul>
<html-el:messages id="msg" message="false">
<li><c:out value="${msg}"/></li>
</html-el:messages>
</ul>
</div>
How do I put the old "Validation ErrorYou must correct the following
error(s) before proceeding:" text at the top if there are indeed errors
to be displayed? That used to happen magically with <html-el:errors/>
using the errors.header & errors.footer in the
ApplicationResources.properties file.
I started to write <c:if test"${not empty ... But I don't know what to
check for emptiness.
I see that the errors are in request scope under the key
org.apache.struts.action.ERROR but all sorts of variations of this break
my page:
<c:if test"${not empty request['org.apache.struts.action.ERROR']}">
It's late on Friday, I'm probably missing something really simple...
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Header for errors (no HTML in the .properties file)
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
I haven't used it, but <html:messages> has a "header" and "footer" attribute
where you can specify a resource key.
Niall
----- Original Message -----
From: "Wendy Smoak" <We...@asu.edu>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, March 05, 2004 10:37 PM
Subject: Header for errors (no HTML in the .properties file)
I'm using this to display errors:
<div class="error">
<ul>
<html-el:messages id="msg" message="false">
<li><c:out value="${msg}"/></li>
</html-el:messages>
</ul>
</div>
How do I put the old "Validation ErrorYou must correct the following
error(s) before proceeding:" text at the top if there are indeed errors
to be displayed? That used to happen magically with <html-el:errors/>
using the errors.header & errors.footer in the
ApplicationResources.properties file.
I started to write <c:if test"${not empty ... But I don't know what to
check for emptiness.
I see that the errors are in request scope under the key
org.apache.struts.action.ERROR but all sorts of variations of this break
my page:
<c:if test"${not empty request['org.apache.struts.action.ERROR']}">
It's late on Friday, I'm probably missing something really simple...
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Header for errors (no HTML in the .properties file)
Posted by Hubert Rabago <ja...@yahoo.com>.
Check the <logic:messagesPresent> and <logic:messagesNotPresent> and see if
they do the trick for you.
- Hubert
--- Wendy Smoak <We...@asu.edu> wrote:
> I'm using this to display errors:
> <div class="error">
> <ul>
> <html-el:messages id="msg" message="false">
> <li><c:out value="${msg}"/></li>
> </html-el:messages>
> </ul>
> </div>
>
> How do I put the old "Validation ErrorYou must correct the following
> error(s) before proceeding:" text at the top if there are indeed errors
> to be displayed? That used to happen magically with <html-el:errors/>
> using the errors.header & errors.footer in the
> ApplicationResources.properties file.
>
> I started to write <c:if test"${not empty ... But I don't know what to
> check for emptiness.
>
> I see that the errors are in request scope under the key
> org.apache.struts.action.ERROR but all sorts of variations of this break
> my page:
> <c:if test"${not empty request['org.apache.struts.action.ERROR']}">
>
> It's late on Friday, I'm probably missing something really simple...
>
> --
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org