You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Nielsen, Jim" <ji...@eds.com> on 2003/06/23 21:01:41 UTC

iterate over an Enumeration

Help.

I am new to Struts and trying to figure out an iterate problem.

I have an action class that uses a business class to return an Enumeration
of objects.
I am trying to pass the enumeration back to jsp and iterate through the set
of objects, displaying attributes for each object in the set. I'm not having
any luck figuring this out.

The action class get the info and sets a variable in the form and also sets
an Attribute (just trying to see what works)

	DirListForm dlf = (DirListForm) form;
	Enumeration dirList = fh.getDirListWithSubDirs(appAbsPath);
	dlf.setDirList(dirList);
	request.setAttribute(Constants.DIR_LIST_KEY, dirList);
		
The JSP has this:

	<logic:iterate id="FileInfo" property="dirList"
type="util.FileInfoDTO">
		<bean:write name="FileInfo" property="name"/><br>
	</logic:iterate>


What do I need to change to get the iterate to 'iterate' over the
Enumeration of objects?

Any and all help is appreciated.

Jim Nielsen
EDS
jim.nielsen@eds.com
phone: (810) 234-4025 (8-394)
AOL IM: JimRNielsenEDS

GLTC-B
4100 S. Saginaw., MC:  485-303-321
Flint, MI  48557


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org