struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinicius Carvalho" <java.vinic...@gmail.com>
Subject Re: Validation problems: again...
Date Tue, 04 Jul 2006 17:06:16 GMT
yes both of em, I've post a pice of the config file ;)
yes either, both has validate(ActionMapping arg0, HttpServletRequest
arg1) signature.
My struts version is 1.2.9.

Looking at the logs, for the action/form that just skip validation:
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-6148719]
RequestUtils.createActionForm(300) |  -->
com.synos.pbh.opdigital.view.form.votacao.CadastrarVotanteForm@edf7e9
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-6148719]
RequestProcessor.processActionForm(339) |  Storing ActionForm bean
instance in scope 'request' under attribute key 'cadastrarVotanteForm'
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-6148719]
RequestProcessor.processPopulate(805) |  Populating bean properties
from this request
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-6148719]
RequestProcessor.processValidate(948) |  Validating input form
properties
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-6148719]
RequestProcessor.processValidate(953) |   No errors detected,
accepting input


Well no errors detected? It does not even calls my validate method...

Now for the other action:

  [java] [OPDIGITAL] DEBUG [HttpRequestHandler-20077295]
RequestUtils.createActionForm(294) |  Creating new ActionForm instance
of type 'com.synos.pbh.opdigital.view.form.mailing.VisitanteForm'
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-20077295]
RequestUtils.createActionForm(300) |  -->
com.synos.pbh.opdigital.view.form.mailing.VisitanteForm@581ea2
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-20077295]
RequestProcessor.processActionForm(339) |  Storing ActionForm bean
instance in scope 'request' under attribute key
'cadastrarVisitanteForm'
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-20077295]
RequestProcessor.processPopulate(805) |  Populating bean properties
from this request
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-20077295]
RequestProcessor.processValidate(948) |  Validating input form
properties
     [java] [OPDIGITAL] DEBUG [HttpRequestHandler-20077295]
RequestProcessor.processValidate(980) |  Validation failed, returning
to '/cadastroVisitante.do'

This time, as the validate method is called, and it fails, i get the
proper message.

Dude I hate this little bugs, Im sure I missed something somewhere ...

Regards
On 7/4/06, David Friedman <humble@ix.netcom.com> wrote:
> Do they both have action mapping with 'validate="true"'?
>
> Do they both have the same signature for you personal validate() method in
> ActionForm?  (i.e. not in Action but ActionForm).  Remember, the method
> signature must match YOUR version of struts.
>
> Are there any errors in your log files that might shed some light on this?
>
> Regards,
> David
>
> -----Original Message-----
> From: Vinicius Carvalho [mailto:java.vinicius@gmail.com]
> Sent: Tuesday, July 04, 2006 12:34 PM
> To: Struts Users Mailing List
> Subject: Re: Validation problems: again...
>
>
> Hum, how could the one of them being validated them? If both extend
> ActionForm? I gave up from validation plugin, I'm writing my own
> validate method, isn't validate called even from ActionForm
> subclasses?
>
> Regards
>
> On 7/4/06, Paul Benedict <paul4christ79@yahoo.com> wrote:
> > You write:
> >  >>Can someone explain me this? Both form extend ActionForm and both
> actions extend a common action.
> >
> > Vinicius, I think you need to refer to my previous email: ActionForm does
> not validate. You need to extend from ValidatorActionForm or ValidatorForm.
> The first valdiates based on URI, the second on the form name.
> >
> > Paul
> >
> > Vinicius Carvalho <java.vinicius@gmail.com> wrote: Well, I've just quit
> the validation on strtuts (based on
> > commons-validator). So I've decided to use dumb manual validation.
> >
> > Well problem is, I still can't get one of my forms to validate!!!!!
> >
> > Here´ my struts-config:
> >
> >
> >
> > type="com.synos.pbh.opdigital.view.form.votacao.CadastrarVotanteForm">
> >
> > type="com.synos.pbh.opdigital.view.form.mailing.VisitanteForm">
> >
> >
> >
> > type="com.synos.pbh.opdigital.view.action.votacao.CadastrarVotante"
> > name="cadastrarVotanteForm" input="/cadastroVotante.do">
> >
> >
> >
> >
> > validate="true"
> >
> type="com.synos.pbh.opdigital.view.action.mailing.ConfirmarCadastroVisitante
> Action"
> > name="cadastrarVisitanteForm" input="/cadastroVisitante.do">
> >
> >
> >
> > What's really pissing me off is that the first formbean/action mapping
> > is just ignoring the validate phase, but the second don't. Can someone
> > explain me this? Both form extend ActionForm and both actions extend a
> > common action.
> >
> > How come this be possible? Please, I tried everthing I know and
> > nothing seems to make it work, I must be missing a spot somewhere,
> > just can't find it.
> >
> > Regards
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> >  Everyone is raving about the  all-new Yahoo! Mail Beta.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Mime
View raw message