Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to define a list as a hidden variable

 
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 ]
 
Marshal
Posts: 67430
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
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 means our mission is in jeapordy! Quick, read this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic