You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Bailey, Shane C." <SH...@saic.com> on 2003/05/27 18:08:05 UTC
Direct me to the archive about individual error reporting next to
fields
I was looking at this:
http://husted.com/struts/tips/017.html
<http://husted.com/struts/tips/017.html>
but what ends up happening is I get the
header to show up next to the error as well.
Is it possible to have
errors.header=The following validation errors occured:
errors.footer=</font>
errors.prefix=<font color="red">
errors.suffix=</font>
errors.required={0} is required.
<html:errors /> //Just show errors.header
then have something like this:
<logic:present ?????> //Not sure what to put
<html:errors property="firstName" />
</logic:present>
<logic:notPresent ????>//Again not sure
<bean:message key="label.firstName" />
</logic:notPresent>
Where either the label shows up or a red label shows
up if there is an error for that element.
????
I keep getting the header showing up next to the name and I
want it to show up only at the top.
I saw something similar in the struts-user emails. Anyone
know the answer?
Re: Direct me to the archive about individual error reporting next
tofields
Posted by Carl Walker <wa...@georgetown.edu>.
You'll need to use your own <bean:message key="errors.header"
/>,<bean:message key="error.myproperty" /> scheme or remove the
errors.header/prefix, etc. from the resource file.
"Bailey, Shane C." wrote:
>
>
> I was looking at this:
>
> http://husted.com/struts/tips/017.html
> <http://husted.com/struts/tips/017.html>
>
>
>
> but what ends up happening is I get the
>
> header to show up next to the error as well.
>
>
>
>
>
> Is it possible to have
>
>
>
> errors.header=The following validation errors occured:
>
> errors.footer=</font>
>
> errors.prefix=<font color="red">
>
> errors.suffix=</font>
>
> errors.required={0} is required.
>
>
>
> <html:errors /> //Just show errors.header
>
>
>
> then have something like this:
>
>
>
> <logic:present ?????> //Not sure what to put
>
> <html:errors property="firstName" />
>
> </logic:present>
>
> <logic:notPresent ????>//Again not sure
>
> <bean:message key="label.firstName" />
>
> </logic:notPresent>
>
>
>
> Where either the label shows up or a red label shows
>
> up if there is an error for that element.
>
>
>
> ????
>
>
>
> I keep getting the header showing up next to the name and I
>
> want it to show up only at the top.
>
>
>
> I saw something similar in the struts-user emails. Anyone
>
> know the answer?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org