You should be using the "property" attribute (as you had in your first post)
to do what you want...

http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section5

...not the "name" attribute - that does a different job...

http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section4

In your first post you indicated that you were using the old (pre 1.0)
struts-form.tld.

   <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="html" %>

... change that to use the html taglib tld:

   <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

then there shouldn't be any problem with the "property" attribute. If you're
using a pre 1.0 version of struts I highly recommend you upgrade.

Niall

----- Original Message ----- 
From: "red phoenix" <[EMAIL PROTECTED]>
Sent: Friday, February 24, 2006 12:46 AM


I changed following code
if ((abc != null) && (abc.length() > 10))


but when the  content of text abc is '123',it's length isn't equals 10,so it
should raise error,but it don't show any error!
If I use <html:errors/> instead of <html:errors name="abc"/>,I can get right
value. Why <html:errors> works well,and <html:errors name="abc"/> don't
work. I am puzzled with it.


On 2/23/06, Dave Newton <[EMAIL PROTECTED]> wrote:
>
> red phoenix wrote:
> > I modify my code,like follows,this time it don't show any error,but when
> the
> > content of text abc is '123',it's length isn't equals 10,so it should
> raise
> > error,but it don't show any error! Why?
> >
> Most likely because in your code you check to see if its length is
> greater than 10.
> >> if ((abc != null) && (abc.length() > 0)) {
> >>
> I could be wrong.
>
> Dave



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

Reply via email to