RE: LookupDispatchAction and DynaValidator

2002-07-30 Thread Parmar, Dipakkumar

Hi scott,

Yes, I'm using html:cancel.
I just test your solution and works fine...

Thanks
Deepak


-Original Message-
From: Scott Carlson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 11:48 AM
To: Parmar, Dipakkumar
Cc: [EMAIL PROTECTED]
Subject: RE: LookupDispatchAction and DynaValidator


Are you using the html:cancel taglib?  RequestProcessor calls
processValidate(), which will skip validation if the html:cancel taglib
generated button was pressed.

(My first response to the list bounced because I forgot to change the To:
whoops.)

--- "Parmar, Dipakkumar" <[EMAIL PROTECTED]> wrote:
> Thanks for your answer. Actually I thought about that but it doesn't help
me
> to disable validation on cancel.
>
> Validataion method call before execute method.
>
> I can turn off validation in config file and call validation from my
action.
>
> Is there any other way to accomplish this?
>
> Thanks
> Deepak
>
>
> -Original Message-
> From: Scott Carlson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 30, 2002 11:17 AM
> To: Struts Users Mailing List
> Cc: [EMAIL PROTECTED]
> Subject: Re: struts-user Digest 30 Jul 2002 14:46:44 - Issue 1730
>
>
> Deepak, I don't have the real code I used in from of me, however, I did
> something like the following.  Hopefully this helps; let me know.
>
> public class MyViewAction extends LookupDispatchAction {
> public ActionForward execute(ActionMapping mapping, ActionForm form,
>  HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException
> {
> if (!isCancelled()) {
> return super.execute(mapping, form, request, response)
> } else {
> // Do canceled work here
> }
> }
>
> // additional methods and getKeyMethodMap()
> }
>
>
> >Forwarded Message
> >From: "Parmar, Dipakkumar" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: LookupDispatchAction and DynaValidator
> >Date: Tue, 30 Jul 2002 10:36:41 -0400
> >
> >Hello everyone,
> >
> >I have subclass LookUpDispatchAction and provided implementation for
> >getKeyMethodMap like
> >
> >protected Map getKeyMethodMap() {
> >
> >Map map = new HashMap();
> >map.put("button.add", "add");
> >map.put("button.delete", "delete");
> >map.put("button.save", "save");
> >map.put("button.cancel", "cancel");
> >return map;
> >}
> >
> >Now my question is how can i disable Validation on cancel action? I'm
using
> >"DynaValidatorForm" form with this action.
> >
> >Deepak
>
>
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: LookupDispatchAction and DynaValidator

2002-07-30 Thread Scott Carlson

Are you using the html:cancel taglib?  RequestProcessor calls
processValidate(), which will skip validation if the html:cancel taglib
generated button was pressed.

(My first response to the list bounced because I forgot to change the To: 
whoops.)

--- "Parmar, Dipakkumar" <[EMAIL PROTECTED]> wrote:
> Thanks for your answer. Actually I thought about that but it doesn't help me
> to disable validation on cancel.
> 
> Validataion method call before execute method.
> 
> I can turn off validation in config file and call validation from my action.
> 
> Is there any other way to accomplish this?
> 
> Thanks
> Deepak
> 
> 
> -Original Message-
> From: Scott Carlson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 30, 2002 11:17 AM
> To: Struts Users Mailing List
> Cc: [EMAIL PROTECTED]
> Subject: Re: struts-user Digest 30 Jul 2002 14:46:44 - Issue 1730
> 
> 
> Deepak, I don't have the real code I used in from of me, however, I did
> something like the following.  Hopefully this helps; let me know.
> 
> public class MyViewAction extends LookupDispatchAction {
> public ActionForward execute(ActionMapping mapping, ActionForm form,
>  HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException
> {
> if (!isCancelled()) {
> return super.execute(mapping, form, request, response)
> } else {
> // Do canceled work here
> }
> }
> 
> // additional methods and getKeyMethodMap()
> }
> 
> 
> >Forwarded Message
> >From: "Parmar, Dipakkumar" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: LookupDispatchAction and DynaValidator
> >Date: Tue, 30 Jul 2002 10:36:41 -0400
> >
> >Hello everyone,
> >
> >I have subclass LookUpDispatchAction and provided implementation for
> >getKeyMethodMap like
> >
> >protected Map getKeyMethodMap() {
> >
> >Map map = new HashMap();
> >map.put("button.add", "add");
> >map.put("button.delete", "delete");
> >map.put("button.save", "save");
> >map.put("button.cancel", "cancel");
> >return map;
> >}
> >
> >Now my question is how can i disable Validation on cancel action? I'm using
> >"DynaValidatorForm" form with this action.
> >
> >Deepak
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: