struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Tag iterator and my object container
Date Tue, 10 May 2011 08:14:29 GMT
Hi everybody,

I have a container object SearchResults which contains a treeMap of simple object SearchResult.

I want to iterate over SearchResults in order to display properties of all SearchResult object

	Class SearchResult {
		//getter and setter

	Class SearchResults {
	      treeMap<String, SearchResult>  resultats;
		public Set<String> keyset();
		public Iterator<String> iterator();
		public SearchResult get(String key);

My Action class have this getter :
	getResultats(){ return (SearchResults)object; };

And my JSP look like :

	<s:iterator value="resultats">
		<s:property value="description" />

But it is not working, s:iterator tag is not iterating over my SearchResults object using
the iterator() method (not called).

How must I construct my SearchResults object in order to make the s:iterator tag iterate over
it ?


Matthieu MARC

Matthieu MARC
Responsable du Service Informatique du Centre d'Angers
Arts et Métiers ParisTech
Tél : 02 41 20 73 61

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message