You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gabriel França Campolina <ga...@gmail.com> on 2004/10/07 02:00:20 UTC

How work to DynaValidatorForm and java.sql.Date

Hi Folks,
I have the problem when i submit a field text that was mapping to
java.sql.date in format dd/MM/yyyy, I received null value, what´s my
problem?? only this value I don't received the other fields(String) i
receved correct.

Sorry my english I'm brasiliam

Thanks,
-- 
Gabriel França Campolina

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


Re: How work to DynaValidatorForm and java.sql.Date

Posted by "Daniel H. F. e Silva" <dh...@yahoo.com>.
Hi Gabriel,

  As many of struts people here i think that the less error prone approach is using 
only String properties in your custom ActionForm classes. So, it will be quite easy
to handle invalid data and whatelse you need to. After validating your form (calling
your validate() method from your Action is the best way when using straight ActionForm instances i
think), you can convert your date from String to java.sql.Date using a converter class.
  
Cheers,
 Daniel Silva.


--- Gabriel Fran�a Campolina <ga...@gmail.com> wrote:

> Hi Pedro,
> 
> I'd like know how i work to java.sql.Date, in my form bean I'm know
> work to fields String , but in Specification of DynaValidator show
> that DynaValidator support java.sql.date, but I have the problem show
> in e-mail number one, Somebody help me????
> 
> Thanks,
> 
> 
> 
> On Thu, 07 Oct 2004 21:18:46 +0100, Pedro Salgado <sa...@04web.com> wrote:
> > On 7/10/04 1:00 am, "Gabriel Fran�a Campolina" <ga...@gmail.com> wrote:
> > 
> > > Hi Folks,
> > > I have the problem when i submit a field text that was mapping to
> > > java.sql.date in format dd/MM/yyyy, I received null value, what�s my
> > > problem?? only this value I don't received the other fields(String) i
> > > receved correct.
> > 
> >  You should always use java.lang.String (or String[]) on your form-bean
> > properties.
> >  The validation part should be implemented on the form validate() method or
> > on the validator or on the struts action itself (-).
> > 
> > Pedro
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> > 
> 
> 
> -- 
> Gabriel Fran�a Campolina
> Tel: 9202-8320
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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


Re: How work to DynaValidatorForm and java.sql.Date

Posted by Gabriel França Campolina <ga...@gmail.com>.
Hi Pedro,

I'd like know how i work to java.sql.Date, in my form bean I'm know
work to fields String , but in Specification of DynaValidator show
that DynaValidator support java.sql.date, but I have the problem show
in e-mail number one, Somebody help me????

Thanks,



On Thu, 07 Oct 2004 21:18:46 +0100, Pedro Salgado <sa...@04web.com> wrote:
> On 7/10/04 1:00 am, "Gabriel França Campolina" <ga...@gmail.com> wrote:
> 
> > Hi Folks,
> > I have the problem when i submit a field text that was mapping to
> > java.sql.date in format dd/MM/yyyy, I received null value, what´s my
> > problem?? only this value I don't received the other fields(String) i
> > receved correct.
> 
>  You should always use java.lang.String (or String[]) on your form-bean
> properties.
>  The validation part should be implemented on the form validate() method or
> on the validator or on the struts action itself (-).
> 
> Pedro
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
Gabriel França Campolina
Tel: 9202-8320

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


Re: How work to DynaValidatorForm and java.sql.Date

Posted by Pedro Salgado <sa...@04web.com>.
On 7/10/04 1:00 am, "Gabriel França Campolina" <ga...@gmail.com> wrote:

> Hi Folks,
> I have the problem when i submit a field text that was mapping to
> java.sql.date in format dd/MM/yyyy, I received null value, what´s my
> problem?? only this value I don't received the other fields(String) i
> receved correct.

  You should always use java.lang.String (or String[]) on your form-bean
properties.
  The validation part should be implemented on the form validate() method or
on the validator or on the struts action itself (-).


Pedro


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