• 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

displaying data from arrays with html:text

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have an array of strings as property in my ActionForm.
I want to display its content into text boxes (each string into its text box) without using struts nested extensions.

How to do it ?

if i use logic:iterate to go trough the collection (array) then i have to specify a bean (html:logic id="beanName") that will repesent the current object of the collection i am iterating
but the html:text uses a property of a bean. the current bean is just a plain java Strign object.. how can i get its value to the html:text ?

example


in JSP..
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this:



--Nimchi
 
Marek Lapin
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for advice

BUT i preffer the 'pure' approach so i need to use only Struts

well, mixing struts and jsp tags.. eah, ugly
 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add these methods to your form bean.


In your jsp, try this.


See Indexed Properties, Mapped Properties, and Indexed Tags

Sheldon Fernandes
[ October 10, 2004: Message edited by: Sheldon Fernandes ]
 
Marek Lapin
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot !!

I omited somehow this part of struts
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic