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]>
