cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <>
Subject RE: how-to create a form widget instance from within java
Date Wed, 16 Sep 2009 17:07:37 GMT
Ok...  that is one is clear now.


Apparently the servlet is not running at the time the spring root
webapplicationcontext is being initialized so that makes sense that I
get a connection refused exception ;-)




From: Robby Pelssers [] 
Sent: Wednesday, September 16, 2009 5:51 PM
Subject: how-to create a form widget instance from within java


Hi all,


Like I've mentioned before on this list, I'd like to do as much as
possible from within java instead of flowscript... 


So I started looking at how form.js takes care of creating a


I configured my packageSearcher as follows:



  <bean id="packageSearcher"

    <constructor-arg ref="packageSelector"/>

    <constructor-arg ref="org.apache.cocoon.forms.FormManager"/>    




The constructor of this class looks like the snippet below:


0     public ObjectSearcherImpl(SearchableObjectSelector
searchableObjectSelector, FormManager formManager) {

1           this.searchableObjectSelector = searchableObjectSelector;


3           try {

4                 this.form =

5           } catch (Exception e) {

6                 e.printStackTrace();

7           }


9           //this.form = form;

10          this.selectedProperties = new ArrayList<String>();

11          initialize();

12    }



I run each time in an exception on line 4:

org.apache.cocoon.forms.FormsException: Could not resolve form
definition URI. at [FormManager] - cocoon://formdefinition


While in flowscript I use the same sourceURI and it does work properly:


  this.form = new Form("cocoon://formdefinition");


Can anybody point me out to why this does not work? And perhaps give me
any clues on how to create a Form instance in java?


Ps... I also tried with a hardcoded URI
http://localhost:8888/parametricsearch/formdefinition but that did not
work as well.


Thx in advance,

Robby Pelssers

View raw message