Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

converting a form bean to value object

 
Rashmi Reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
please tell me how do we convert a java form bean to a value object.
Also the code details.
Thanks,
Rashmi
 
Rashmi Reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To elaborate on my question, i have a html form bean, i want to seperate the business login in the ejb. To call a ejb method I need to send a value object that has all the fields of the html form.
Please give me the code example.
Thanks & Regards,
Rashmi.
 
Suresh Babu Akula
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rashmi Reddy ....
How r u..
to your problem what you do is....
From Html send all the details to Jsp/servlet Page there using getParameterNames() method retrive all the names with these name you can retive the values. So now put all these names and values in a HashMap.
Now send these HashMap to Bean or EJB.
I think you know how to retrive the values form HashMap.

I think this solutions will solve to your problem

Suresh
 
Rashmi Reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks, that might work..
Rashmi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic