• 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

sending form id to another action

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a showcontact.jsp it will shows all conct details with ids. for each contact need to display edit contact. edit contact is a different action and different jsp. how can I send id to that action. Please give me reply asap.
Thanks,
reddy

 
Ranch Hand
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If image is using for edit each contact, below code snippets can be reffered.





In corresponding action class
 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for you reply, but I have a question the below is the code I am using . I need to use this contID in editcontacts.action. please give me little bit explanation too.

<s:iterator value="ShowContacts" id="contact">
<tr>
<td> <s:property id="contID" value ="#contact.contactId" /></td>
<td> <s:property id="fName" value="# contact.firstName" /> </td>
<td> <s:property id="lName" value="# contact.lastName" /> </td>
<td> <s:property id="PNumber" value="# contact.PhoneNumber" /> </td>
<td> <s:property id="emailAddr" value="# contact.emailAddress" /> </td>
<td> editContact </td>
</tr>

Thanks
Reddy
 
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You already have the necessary information in the FORM elements and in the corresponding Form bean. You need to create a new Form bean (the one that is associated with the Edit page) and populate the details in it. This would let you show up the detail in the Edit contact page.

I am assuming you are or Struts 1.x. If you are on 2.x then use the same similar logic.

Cheers,
Raj.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic