On Thu, Jul 22, 2004 at 01:27:55PM +0200, Gianugo Rabellino wrote: > On Jul 21, 2004, at 7:54 PM, Bruno Dumon wrote: > >Maybe you could refactor some of that code into java classes that you > >call from the javascript. Or you can also write the validators directly > >in Java (which doesn't require declaring them in cocoon.xconf and > >making > >builder classes for them, there is also something like <fd:java > >class="..."/>) > > Yup, this solves the language issue but not the architectural one: > still no avalon context available.
I did not dig in the code much, but I think we could extend an avalon context to the validators the same way it is done for a FormHandler. In: cocoon-2.1\src\blocks\forms\java\org\apache\cocoon\forms\acting\HandleFormSubmitAction.java see the line: LifecycleHelper.setupComponent(formHandler, null, null, manager, null, null); Not sure how efficient this would be, but if it gets the job done... --Tim Larson
