Yes Vic Cekvenich ,
it's working. Now I have made three different entries in struts-config.xml
file for calling same Action class
  <action    path="/clientregnew"
     type="com.rapideffect.pms.server.ClientRegistrationAction" >
   </action>
   <action    path="/clientreg"
     type="com.rapideffect.pms.server.ClientRegistrationAction"
      name="clientReg"
      scope="request"
     input="/client.jsp" >
   </action>
   <action    path="/clientregexisting"
     type="com.rapideffect.pms.server.ClientRegistrationAction"
      name="clientReg"
      scope="request"
     input="/client.jsp"
    validate="false">
 </action>

This way it is working perfectly
Anant Sagar



----- Original Message -----
From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 11:25 AM
Subject: Re: How to distinguish calls to Action


> Subject: Re: How to distinguish calls to Action
> From: Vic Cekvenich <[EMAIL PROTECTED]>
>  ===
> Set validate to false in struts config, and validate on save.
> Vic
>
> Anant sagar wrote:
>
> > Dear All ,
> > I m new to struts .I m facing one more problem.
> >
> > I have one form which is doing two function
> > 1. ) to register new client
> > 2.)  to edit the existing clients data.
> > There are 5 fields in all first one being client id . When initially
page
> > is
> > requested ,the page should show list of ids ( from DB )as drop down menu
> > with New Client as its first element.All other fields should be kept
blank
> > so that the necessary information can be filled in for that new client.
> > All
> > other fields are mandatory. If user clicks save it saves the new clients
> > details and shows thankyou page .If user select one of the existing
client
> > ids from drop down menu
> > it should call some action to populate the other 4 fields from
> > database.User
> > can edit the data of existing client and again save .
> >
> > My problem is :
> > I have made one Action class which has two mappings as below.(Action
class
> > internally has 3 different task -NewClient,ExistingClient,Save )
> >  <action    path="/clientregnew"
> >      type="com.rapideffect.pms.server.ClientRegistrationAction" >
> >  </action>
> >  <action    path="/clientreg"
> >      type="com.rapideffect.pms.server.ClientRegistrationAction"
> >      name="clientReg"
> >      scope="request"
> >      input="/client.jsp" >
> >  </action>
> >
> > First mapping i m using for initially opening client.jsp page It calls
> > Action class explicitly instantiate ClientForm bean ,get clients ids
from
> > DB
> > and forward request to client.jsp . When user selects client ids from
> > dropdown list( onchange event ) i m using second mapping to call Action
> > class, But it does'nt call Action class as it calls ClientForm bean's
> > validate method, finds mandatory fields( 4 other fields ) are empty and
> > returns the page with error.
> >
> > If you have any suggetion pls let me know.
> >
> > THANKS in advance
> >
> > Anant Sagar
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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

Reply via email to