I've got an ActionForm that contains a "Bean" that contains an object with information I need to iterate on. It looks something like this:
I'm having trouble figuring out how to use <html:text> to get at the information in the Contact class:
Obviuosly this doesn't work since
name is not a property of
contacts. I tried to get around this using <c:set> like so:
That DOES work to populate the text box, but not when the user changes the value of the textbox and submits. Instead of getting the changes, I get the originally populated value. I'm guessing this is because <c:set> does not have the
var point to the actual memory location of
value and thus when the text value gets changed, it's not changing the actual bean stored in the session.
Short of redesigning the classes so there aren't 2 nested levels (which would really break my encapsulation), what can I do? Is there a JSTL or
Struts tag that I can use instead of <c:set> to govern the scope of the
property attribute for <html:text>?
Thanks!
Ryan
[ February 02, 2007: Message edited by: Ryan Kade ]