You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by magic <ma...@goodwillheater.com> on 2005/05/19 09:35:15 UTC

validation problem

hi, all
        Recently, I upgraded my applications from cocoon2.1.5 to 2.1.7. I found all validations in my Cforms did not work when the button is "fd:action".But "fd:submit" is ok.Now I want to validate Cform with "fd:action" in 2.1.7.Someone can help me?

thanks!

Re: validation problem

Posted by magic <ma...@goodwillheater.com>.
Thanks a lot.
But submit always turn to next page, and I want to stop at current page when I save it.
Now, I add some scripts in "fd:action", then it works find.

 <fd:action id="save" action-command="shkh" defaul="false">
 <fd:label><i18n:text key="save">save:</i18n:text></fd:label>
   <fd:on-action>
    <fd:javascript>
     var parent = event.source.parent; 
     parent.validate();
    </fd:javascript>
   </fd:on-action>
 </fd:action>


  ----- Original Message ----- 
  From: Philippe Guillard 
  To: users@cocoon.apache.org 
  Sent: Thursday, May 19, 2005 10:20 PM
  Subject: Re: validation problem


  magic wrote:

  >hi, all
  >        Recently, I upgraded my applications from cocoon2.1.5 to 2.1.7. I found all validations in my Cforms did not work when the button is "fd:action".But "fd:submit" is ok.Now I want to validate Cform with "fd:action" in 2.1.7.Someone can help me?
  >
  >thanks!
  >  
  >
  It seems to me that action widget role is to do something without
  validation. I suggest you always use submit where it is possible to set
  to validate="false".

  http://cocoon.apache.org/2.1/userdocs/forms/widget_action.html

  Phil

  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
  For additional commands, e-mail: users-help@cocoon.apache.org

Re: validation problem

Posted by Philippe Guillard <pg...@citycita.net>.
magic wrote:

>hi, all
>        Recently, I upgraded my applications from cocoon2.1.5 to 2.1.7. I found all validations in my Cforms did not work when the button is "fd:action".But "fd:submit" is ok.Now I want to validate Cform with "fd:action" in 2.1.7.Someone can help me?
>
>thanks!
>  
>
It seems to me that action widget role is to do something without
validation. I suggest you always use submit where it is possible to set
to validate="false".

http://cocoon.apache.org/2.1/userdocs/forms/widget_action.html

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org