struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Lapenne" <nicolas.lape...@naema.org>
Subject Re: html:error tag
Date Thu, 06 Jun 2002 10:13:39 GMT
There is a propertie file define in web.xml (for behind, it's
ApplicationResources.properties located in youProject/source/  )
    <init-param>
        <param-name>application</param-name>
        <param-value>ApplicationResources</param-value>
    </init-param>

where you add an error to you ActionError, you do :
    errors.add("nom", new ActionError("error.modifProfil.nom.required"));

where error.modifProfil.nom.required is define in your propertie file :
    error.modifProfil.nom.required=<li>Le champ <i>Nom</i> ne peut ĂȘtre
vide</li>

and you have to put this 2 parameters :
    errors.header=Please correct this  :
    errors.footer=Thanks

in jour jsp file, you will put
    <body>
        <html:errors/>
        your text
    </body>

and <html:errors/> will write
    <body>
        Please correct this  :=<li>Le champ <i>Nom</i> ne peut ĂȘtre
vide</li>Thanks
        your text
    </body>

It's what's you want ?

----- Original Message -----
From: "Schmidt, Carl" <Carl_Schmidt@troweprice.com>
To: <struts-user@jakarta.apache.org>
Sent: Thursday, June 06, 2002 12:07 AM
Subject: html:error tag


The docs for the property attribute of this tag state:
"Name of the property for which error messages should be displayed".
The property of what?  The bean specified by name?

Carl

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message