Try this:
http://cocoon.apache.org/2.1/userdocs/transformers/sql-transformer.html

Add the above transformer to an internal pipeline, write a stylesheet which transforms the results into fd:selection-list markup and then in your form definition point the "src" attribute to your pipeline (e.g. cocoon:/myListPipeline).

Alternatively (if you have existing Java APIs/classes above the DB for example and don't want to talk ot the DB directly) you could write your own generator/transformer rather than use the sql transformer

Scott.


Miller, Andrew (BL) wrote:

My apologies for what I am sure is an easy question.

I am trying to think of how I should populate a cocoon forms selection list field from a MySQL query.

I have a form definition and a form template working fine as is and I can get my sql query to serialise its results in a web browser but now I would like to use these results to populate one of the selection list fields in my form as part of the generation process.

One of the samples hints at how to do this but my grasp of cocoon is still quite weak and some tips would be appreciated.

Thanks in Advanced

Andrew Miller



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to