cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: AW: own widget
Date Thu, 08 Nov 2007 15:13:15 GMT
Michel Erard pisze:
> Hi Grzegorz, 
> yes, I think for this example your right, perhabs it's enough when I add a new xslt.
But when this is not enough, how I add a widget?

Let's assume you want to create widget named MyOwnWidget, then you will need to:
1. Implement MyOwnWidget class extending o.a.c.forms.formmodel.AbstractWidgetAbstractWidget
2. Implement complementary classes to the first one responsible for handling definition of
MyOwnWidgetDefinition (extending AbstractWidgetDefinition or similar) and
MyOwnWidgetDefinitionBuilder (extending AbstractWidgetDefinitionBuilder).
3. Register your own widget (see [1]).
4. Write your own JX macros for your widget similar to standard macros (see [2]).
5. Write your own XSLT file for styling your own widget.
6. Integrate everything together. (consists of adding few imports so your macros and xsls
are visible).

May seem like a lot of work but in a fact most of this steps are really simple. For example,
for the
most of widgets classes implementing them are really straightforward as they inherit everything
abstract classes.

Before you start to implement anything new I think it would be a good idea to evaluate all
widgets and their varations (different styling) so you are not going to waste your time if
solution exists.

I hope that helps a little.


Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

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

View raw message