cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Homeijer <M.Homei...@devote.nl>
Subject Extend castortransformer (scratchpad) to handle collections
Date Tue, 02 Jul 2002 14:14:06 GMT
Hi,

The current castortransformer is not able to handle collections.
The following lines of code adds Collection handling to the
CastorTransformer:

	if (Collection.class.isAssignableFrom(bean.getClass())) {
		Iterator i = ((Collection)bean).iterator();
		while (i.hasNext()) {
		      marshaller.marshal(i.next());
		}
	} else {
	      marshaller.marshal(bean); // THIS line is currently only
implemented.
	}

Michael Homeijer.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message