The code suggested below seems to work as far as displaying the appropriate
header message if errors are present but none of the actual error messages
get printed.. any ideas why

-----Original Message-----
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 11:19 AM
To: Struts Users Mailing List
Subject: Re: using multiple error messages


By default it looks for action errors under the same key as <html:errors/>
does (Globals.ERROR_KEY) or you can specify a message="true" attribute which
causes it to look under the Globals.MESSAGE_KEY instead, or you can specify
your own key with the "name" attribute.

The id is something different, you specify anything you want, it stores each
message under  a page context attribute
that you name in "id"

   <html:messages id="myError" header="errors.systemheader">
        <bean:write name="myError"/>
   </html:messages>


----- Original Message ----- 
From: "Nimmons, Buster" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 11, 2004 4:58 PM
Subject: RE: using multiple error messages


> Sorry I replied to the wrong post earlier.... I noticed the API
> documentation stated that the messages tag could Iterate over the
> ActionErrors but does not say what the ActionErrors bean is saved as so I
> don't know what to specify in the id attribute.. Does struts define a
> constant somewhere defining the bean id
>
> -----Original Message-----
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 11, 2004 10:39 AM
> To: Struts Users Mailing List
> Subject: Re: using multiple error messages
>
>
> The <html:messages> tag does exactly what you want - you can specify the
> header/footer/suffix/prefix as attributes on the tag:
>
>    <html:messages header="errors.systemheader"/>
>
> http://jakarta.apache.org/struts/userGuide/struts-html.html#messages
>
> Niall
>
> ----- Original Message ----- 
> From: "Nimmons, Buster" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 11, 2004 2:07 PM
> Subject: using multiple error messages
>
>
> > currently my ApplicationResources.properties file contains the following
> > errors.header entry
> >
> > <h3><font color\="red">The following error occurred</font></h3>You must
> > correct the following error(s) before proceeding\:<ul>
> >
> > this is fine for application errors. However I would like to define a
> > different header for System errors so I may such as
> >
> > <h3><font color\="red">The following unrecoverable error(s) have
> > occurred</font></h3>It is not possible to proceed. When contacting
support
> > identify the errors below by the error ID listed\:<ul>
> >
> > How can I specify multiple error headers and tell the <html:error tag to
> use
> > the appropriate one
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to