Greg,
I have done more or less what you are trying. I also store data in a Xindice database (version 1.1b5-dev). I use the binding framework for cforms in cocoon to populate a form with that data, which is then presented to the user. There is an example in
samples/blocks/forms/aggregate/example.js
you could have a look at. Also, check out the binding framework at http://cocoon.apache.org/2.1/userdocs/forms/binding.html, which should clarify things as well.
I have a local object in the flow script that acts as a bean for a form. This bean is populated from request parameters, the values of which I took earlier from the database. Use form.load(bean) to populate your form.
You can also access the database directly in your script. You could return some object from persistence, which you could use to populate your bean. Maybe it is possible to use that object as the bean for the form (not tried).
This all works but it is not necessarily the best or most elegant way of doing things.
Andre.
Greg wrote:
Hello All,
I've been using cocoon to develop some data entry forms. The design has changed slightly and I must prepopulate some of the widgets. The data comes from a document in xindice. I can use my jsps to get the data and pass it to the flowscript as request parameters but am unsure how to get these values into my widgets.
Also, it would be neater if the forms actually retrieved the data from xindice themselves! The the db will always be local.
I'm using cocoon 2.1.4 & xindice 1.6.1.
Any help appreciated,
Greg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Andre H. Juffer | Phone: +358-8-553 1161
The Biocenter and | Fax: +358-8-553-1141
the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
