cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Taffelt" <frank.taff...@interface-business.de>
Subject Re: Anyone using Castor with Cocoon2
Date Fri, 19 Oct 2001 13:31:38 GMT
Hi,

i'm using the following function to marshal a castor object into cocoon.

/**
  * marshalls an object into cocoon
  *
  * @param obj an <code>Object</code> the Castor generated Object
  * @param map a <code>Mapping</code> the Castor Mapping Object for the
given object
  * @exception Exception if an error occurs
  */
 private void marshal(Object obj,Mapping map) throws Exception{
   Marshaller marshaller = new Marshaller(new DocumentHandlerAdapter(new
EmbeddedXMLPipe(this.xmlConsumer)));
   marshaller.setMapping( map);
   marshaller.marshal(obj);
 }

you can call this from an xsp-page to render your data.

hth,
frank





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message