cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rice Yeh" <>
Subject Re: [cforms] How to get the LibraryManager?
Date Sat, 24 Mar 2007 08:33:19 GMT
  After studying cocoon-forms's source code a while, I find it is very hard
to create widgets without creating a form widget. To create a widget, one
has to start from a FormManager. All of the classes FormManager, Form,
FormDefintion, FormDefinitionBuilder, Widget, WidgetDefinition,
WidgetDefinitionBuilder, ..etc. are coupled so tight. Even a widget has an
association to its definition. It seems impossible to create a widget
without through its definition. Hence, to dynamically modify a form's
structure is not that easy in cforms. I originally thought it should be
quite easy to do it like in wicket.


On 3/24/07, Rice Yeh <> wrote:
> Hi,
>   I am writing some code to insert widgets into a form dynamically in the
> on-action event of an action widget. But I have the most code written in a
> java method first. Since my code is not in a Serviceable class, I don't have
> access to a service manager. But I need to access the LibraryManager. I try
> to access it through the spring WebApplicationContext, but it says there is
> no such bean definition. With the same way, I can access SourceResolver. My
> code is like the following:
> WebAppContextUtils.*getCurrentWebApplicationContext*().getBean(
> org.apache.cocoon.forms.formmodel.library.LibraryManager.*ROLE* );
> How can I get the LibraryManager without a ServiceManager?
> Rice

View raw message