You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Dmonte, Kususm" <ku...@citigroup.com> on 2004/07/23 14:37:16 UTC

Problem using validator for map backed action form

Hi all
I have used map backed action form in my application.
I am not able use validator for map backed action.If anybody has used it in their applications , pls do reply.
Also I want to know if javascript validations can be done for the form.
This is kind of urgent for me , to deciede whether we can use mapbacked forms or no.
Thanks in advance
Kusum

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Problem using validator for map backed action form

Posted by Ted Husted <hu...@apache.org>.
There are issues with using map-backed forms with the Struts Validator. Though, the user list is the place to ask about how people are using things now. (It looks like you might have the address for "Struts User" set to here too.) 

My personal recommendation is to use finely-grained DynaValidationForms. They use a Map in the background, which you can pull off and hand to the business layer, if you are using String-based Maps there too. 

One enhancement I'd like to see is merging the XML descriptors for DynaActionForms and the Validator, so you can define everything once in a single place. The validator form already includes what amounts to a field label, which a custom tag could use to create an entire default form, datagrid-style.

An omnibus form descriptor could also be a hook for a conversion tool, since if you are validating a field for an Integer, it's a fair bet that's what you want to convert it to :) The conversion tool could create a Map from the validated data, which could then be wrapped into a Commons Chain Context. The sf.net FormProc project does something similar. 

[Ask a question on a development list, and you're going to get a development answer :)]

-Ted.

On Fri, 23 Jul 2004 08:37:16 -0400, Dmonte, Kususm wrote:
> Hi all
> I have used map backed action form in my application. I am not able
> use validator for map backed action.If anybody has used it in their
> applications , pls do reply.
> Also I want to know if javascript validations can be done for the
> form. This is kind of urgent for me , to deciede whether we can use
> mapbacked forms or no. Thanks in advance Kusum
>
> --------------------------------------------------------------------
> - To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For
> additional commands, e-mail: dev-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org