The latest nightly builds let you get a Map of any
objects (except booleans) returned from a validation
method.  The latest configuration of the Validator xml
rules (conf/share/validator-rules.xml) calls some
methods that return the correctly typed object
(primitives, date, and credit card).  So once the
validation has been run, you can retrieve these values
by calling these methods.  The key is the full
nested/indexed property (addresss.person[1]) and the
value would a java.util.Date for example.

ValidatorForm.getValidatorResults().getResultValueMap()

David

--- Andres Angelani <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Abstract:
> 
> I want to access commons validator configuration to
> detect date formats and
> data type especification. Is there any way to get
> this? I've found the
> objets that represent the node but  don't seem to
> realize how to retrieve
> active configuration for a given session (consider
> the fact of
> localization).
> <field    property="date"
>                  depends="required,date">
>                    <arg0
> key="typeForm.date.displayname"/>
>                      <var>
>                       
> <var-name>datePatternStrict</var-name>
>                       
> <var-value>MM/dd/yyyy</var-value>
>                      </var>              
> </field>
> 
> Detail:
> I'm building an enterprise framework, using struts,
> tiles and commons
> validator for the  web tier. Command pattern + value
> objects seem like a
> good idea to encapsulate business logic calls and
> reduce calls to
> distributed objects suchs as EJBs. I'm looking for a
> way automate the
> process a little further. I want to be able to
> convert data types
> automatically from struts forms to value objects,
> which for the most part
> I'm able to do so far; the problem is that this
> framework supports
> multi-language and of course, dates are input in
> different ways according to
> the user's language selection.
> 
> 
> By the way, Struts rocks!
> 
> Thanx in advance,
> Andrés
> 
> Lic. Andrés Angelani
> Sr Internet Developer
> 
> Sistemas Estratégicos
> San Martín 575, piso 4
> Argentina
> tel. 4322-4040 int.135
> fax. 4393-8270
> e-mail. [EMAIL PROTECTED]
> web. www.se.com.ar
> web. www.telesoft-crm.com
> 
> 
> 
> 
> 
> 
>
----------------------------------------------------------------------------
> Telesoft, aplicación de CRM (Customer Relationship
> Management), provee una
> plataforma común para la interacción con el cliente,
> a través de sus
> aplicaciones para las areas de Ventas, Marketing,
> Customer Care y Cobranzas.
> Para más información por favor visite nuestro
> website...
> http://www.telesoft-crm.com
>
----------------------------------------------------------------------------
> Este mensaje y sus adjuntos son confidenciales para
> el usuario común de la
> dirección de correo electrónico a quien está
> dirigido, como también puede
> tratarse de información privilegiada. En caso que
> Ud. no fuese el
> destinatario, no podrá copiar, enviar, revelar el
> contenido o utilizar
> alguna parte de este mensaje o de sus adjuntos.
> Si hubiese recibido este mensaje por error, por
> favor informe tal situación
> al emisor, devolviéndole el correo electrónico y
> borrándolo de su sistema.
> No se garantiza la seguridad o la exactitud de las
> comunicaciones por
> Internet debido a que la información puede ser
> interceptada, modificada,
> perdida, llegar tarde o contener virus. El emisor,
> por lo tanto, no acepta
> responsabilidad por errores u omisiones en el texto
> de este mensaje que
> surjan a partir de una transmisión por Internet.
> Las opiniones vertidas en este mensaje  son las del
> autor y no las
> impartidas o compartidas por la compañía, a través
> de la cuál se envía el
> presente mensaje, a menos que se indique lo
> contrario claramente en el
> mismo, y que se verifique la autoridad del autor
> para comprometer a nuestra
> empresa.
>
----------------------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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

Reply via email to