• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent! Action and forms

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can I have more than one form associated with one action?.

I have a scenario where I have a search form, entry form. I want to make use of DispatchAction to search, Add/Update/Delete. In this case I will have two ActionForm that is searchForm and EntryForm.
<form-bean name="CreateErrorMessageActionForm" type="demo.struts.CreateErrorMessageActionForm" />
<form-bean name="SearchErrorMessageActionForm" type="demo.struts.SearchErrorMessageActionForm" />

<action input="/index.jsp" path="/messages" scope="request"
name="CreateErrorMessageActionForm"
type="demo.struts.MessageDispatchAction" parameter="methodToCall">
<forward name="continueList" path="/ListMessages.jsp" />
<forward name="modifyMessage" path="/ModifyMessage.jsp" />
</action>

How will I be able to configure these two forms to one action?

How this can be acheived?

early replys would be appreciated. this is kind of an urgent

Thank you very much
Saritha
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I definitely don't know the answer but if u want it urgent, why don't u use a single action form?
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I don't get any solution for my question, then I think I would probably go with having single form for my search and entry forms. But I feel this is just kind of manipulating as some of the fields in my form bean will always be null. I mean object will never be complete or contain complete information. with this approach I am not sure if there will be problems between requests.
reply
    Bookmark Topic Watch Topic
  • New Topic