• 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

passing object from jsp to action

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

I am new to struts. I am working on an application and facing a few difficulties, any help would be highly appreciated.
- I have a ValueObject in my action which I am using on my jsp. The VO has some text fields and a String Map. Through OGNL expressions, the text field values get set to the VO, but the Map is not getting updated. Currently, I am setting the Map in session on the jsp, and then setting it back to the VO in the action, which I don't want to do. I am wondering if I am not specifying the Map field in my acceptableParameterName. I have specified the map as <VO>.<mapName>. Is it correct?
- Is it possible to pass the whole updated VO back to the Action (instead of setting the value of each field) just like it gets set from Action to the jsp (when its defined as a parameter)?

Thanks.
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just create a SSCCE * version of your code
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you can pass the entire VO back
<logic:iterate name="monthlyGainLossForm" property="ptcList" id="productTaxCat">
just give your VO as ID and your form will pick up values and pass to action
 
reply
    Bookmark Topic Watch Topic
  • New Topic