This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes s:iterator, can you save values other control tags like s:label? POJO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "s:iterator, can you save values other control tags like s:label? POJO" Watch "s:iterator, can you save values other control tags like s:label? POJO" New topic
Author

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

E Robb
Ranch Hand

Joined: Aug 27, 2010
Posts: 111
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: s:iterator, can you save values other control tags like s:label? POJO