cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject RE: Generic component and cocoon
Date Mon, 08 Mar 2004 18:05:11 GMT
I think the answer to your question is yes, you can.  I have several
components that I have created.  You define them in cocoon.xconf and perhaps
cocoon.roles.  Take a look at how input modules are done.


 -----Original Message-----
From: 	Oscar Picasso [] 
Sent:	Monday, March 08, 2004 9:50 AM
To:	cocoon list
Subject:	Generic component and cocoon


Is it possible to write generic components but make them available only to
sitemap container for reuse by sitemap components?

Let's give an example.

I have a DefaultPathProvider with a provide(String partialPath) methods that
returns a complete default path from a partial path.

It is configured with an xml file like this one:

<path-step name="book" default="geography">

  <path-step name="history" default="middle-age">

  <path-step name="geography" default="europe">
    <path-step name="america" default="...">
    <path-step name="europe" default="italy">
      <path-step name="germany"/>
      <path-step name="france"/>
      <path-step name="italy"/>
      <path-step name="spain"/>


Once configured with the above xml file, the provide method would return the
following results.

provide("/book") --> "/book/geography/europe/italy"
provide("/book/geography") --> "/book/geography/europe/italy"
provide("/book/geography/europe") --> "/book/geography/europe/italy"

provide("/book/history") --> "/book/history/middle-age/..."

I would like this kind of component to be managed by the sitemap level
manager, to make it available to the serviceable components of the same

Does it make sense? Are they some examples of code in the cocoon
that use a similar approach?

Let me know if I am completly wrong on the way of developping generic
and use them in cocoon.



Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster

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

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

View raw message