Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to define a list as a hidden variable  RSS feed

 
preethi ranga
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i want to know how do i define a hidden variable which has a list of values.
I know for a single value we can define it in this way.where i have a corresponding get/set methods in the formbean.



but say i have a get/set method in formbean which returns a list .how do i define that variable which returns a list as hidden variable.Your help is greatly appreciated.

Thanks
Madhavi
[ September 18, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask questions that involve Struts tags in the Struts forum. I have moved this post there for you.
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this situation I've alwas iterated over the list to create a list of hidden fields. Like this:



To do this in a single tag I would think would require you to make a getter that could turn all of the data in your list into a string and a setter that could convert all of the data from a string back into your list. If there is any easier cleaner way to do this I'm interested to know it as well.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!