• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pre-populate form

 
M Smith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a number of links on the page - update email, change address. When the link is clicked I need to create a form (put in the request?)- pre-populate it with the user information so when the JSP is loaded the information is displayed for user to update. I think I need manually instantiate and pre-populate an
action form before forwarding to JSP.
Any suggestions would be greatly appreciated
 
Srikanth Shenoy
author
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Smith,
You have to manually instantiate and prepopulate the ActionForm. There is no way around it. However you can use the BeanUtils.copyProperties() from Common BeanUtils package to reduce some of the burden of copying from source to the target.
-Srikanth Shenoy
 
M Smith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Do you have a code example on how to do this correctly?
Thank you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic