You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bi...@mindspring.com on 2002/02/25 21:56:38 UTC

Struts Validator help

Hi,

I'm new to Struts and Struts Validator.  I have been able to setup struts and the validator package to work properly on my machine.  I'm having trouble however with getting and displaying the error message properly.  I can display them at the top of the page using <html:errors/> tag but I would like to be able to place the errors individually at different places in the page.  I tried       <html:errors property="registrationForm.email.displayname" /> but this doesn't seem to be working.  The line in the resource file is: "registrationForm.email.displayname=E-mail".  I think the key is not in the collection of errors.  Is there a way to see what keys are available in that collection.   I do not have specific error.propname=... entry in the resource file.  Is that needed?

Thank you.

Bill

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts Validator help

Posted by David Winterfeldt <dw...@yahoo.com>.
It is keyed on the property, not the message resource
key.  So it would be the same as the property for you
html:text tag.

<html:errors property="email" />

This would represent getEmail/setEmail.

David

--- bilal@mindspring.com wrote:
> Hi,
> 
> I'm new to Struts and Struts Validator.  I have been
> able to setup struts and the validator package to
> work properly on my machine.  I'm having trouble
> however with getting and displaying the error
> message properly.  I can display them at the top of
> the page using <html:errors/> tag but I would like
> to be able to place the errors individually at
> different places in the page.  I tried      
> <html:errors
> property="registrationForm.email.displayname" /> but
> this doesn't seem to be working.  The line in the
> resource file is:
> "registrationForm.email.displayname=E-mail".  I
> think the key is not in the collection of errors. 
> Is there a way to see what keys are available in
> that collection.   I do not have specific
> error.propname=... entry in the resource file.  Is
> that needed?
> 
> Thank you.
> 
> Bill
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>