You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Michael Homeijer <M....@devote.nl> on 2002/07/02 16:14:06 UTC

Extend castortransformer (scratchpad) to handle collections

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