Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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

s:iterator, can you save values other control tags like s:label? POJO

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a s:iterator that that is calling a POJO. I dont want the values printed out to screen I want them stored and used in a s:label value.

Is it possible and is the correct approach? I am working with the simple xhtml theme on a non form. Im just trying to print out a table.

Create the objects:



The POJO returns a hashmap with this call:


This simple table works correctly as struts is using s:label to insert the tr and td tags.


The html it is rendered like this:


My problem is this... one of the calls to the control label value needs to use an iterator to call a second method to get multiple data points to display in the same control value. Its should look like this when rendered.


I need this iterator:


Instead of printing out the iterators data to directly to the the JSP page is there a way to run the iterator and place the results in the s:label value?

Any help would be appreciated.

thanks,
earl
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic