Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to edit data on a form

 
chetan kokil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI i am new bie to struts, i want to edit data on a form.
i have a single form , through which i enter the data into the database.
now i want to use this form only and want to edit the data, so is there any ting.

i am using Dispatch Action,

looking forward for a positive response.

Thanking you
Chetan kokil
 
lynn fann
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in your actionclass method have something like this

Object obj = new Object();
PageForm oForm= (PageForm) form;

oForm.setName(obj.getName());
oForm.setId(obj.getId());

in jsp:
<html:text property="name"/>

'PageForm' == your actionForm
'Object' == your object class
oForm.setName() == will set the respective property value to the form
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic