cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <>
Subject Using business objects instead of XML
Date Sat, 02 Apr 2005 07:53:11 GMT
Dear List,

I am trying to insert a domain object into the pipiline with control 
flow following a suggestion given earlier on this list:

Suppose, I return some object from a domain class instance, like

var domainObject =;

The domainObject has all the getters available, e.g. getName(), etc, so 
it acts like a regular bean.

Now, I would like insert this object in the pipeline with

cocoon.sendPage ("page", domainObject);

In the sitemap, I have

<map:match pattern="page">
   <map:generate src="module:flow-attr:domainObject" />
   <map:serialize type="xml" />

(This is just to see how it looks like.)

The result of all this is an error of the form:

org.apache.cocoon.ProcessingException: Exception during source 
resolving.: org.apache.excalibur.source.SourceException: The attribute: 
domainObject is empty

This looks obvious to me, since it is probably not clear that the 
domainObject in facts represents some class, defined in 
So, I tried to define the DomainObject class in JavaScripy, like

function DomainObject()

and populate the object manually before calling cocoon.sendPage. The 
result is however the same.

I am using cocoon 2.1.7.

Could anyone point out in some detail how exactly I should do this.


Andre H. Juffer              | Phone: +358-8-553 1161
The Biocenter and            | Fax: +358-8-553-1141
     the Dep. of Biochemistry | Email:
University of Oulu, Finland  | WWW:

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

View raw message