Toby wrote:
I'm trying to implement a dynamic selection list for a form field.
I need to extract the selection values and labels from a database.

The only way of filling a selection list with dynamic values, that I
could glean from the documentation, is by using flow-jxpath.

Which poses the problem of how to make a SQL query in javascript.

Or, if flowscript could fetch an arbitrary sitemap URI and access the
generated XML data, I could write the query in ESQL.  Is it possible?

Am I barking at the wrong tree here?  How should I proceed?

Hi Toby,

You can also make a pipeline that fetches the data from the DB using the SQLTransformer [1], and transforms the resulting XML into a CForms selection list format. Then in you form model specify a dynamic selection list:

<fd:selection-list src="cocoon:/mychoices.xml" dynamic="true"/>

This seems much easier than the flow/jx solution to me. See [2] for more info.

Regards,
Niels

[1] http://cocoon.apache.org/2.1/userdocs/sql-transformer.html
[2] http://cocoon.apache.org/2.1/userdocs/widgetconcepts/selectionlists.html


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

Reply via email to