Simon H�rlimann (IMSEC) wrote:
Hi all
I want to use the woody form framework together with databases. Unfortunatly there's no database sample in the woody block. I did some work with both normal and modular database actions and cutsom forms. That work is based on the samples in the database block.
But I would like to use the woody form framework now. I don't know how to couple modular database actions and woody together. I guess it works through the request-attribute input module and JXPath expressions... but I'd appreciate every hint/link.
some intro on Woody: http://wiki.cocoondev.org/Wiki.jsp?page=Woody
as for some additional comments...
the 'vision' would be to have any arbitrary business logic connect to your database and then 'bind' that information into the woody-form
This binding is easily done programmatically by calling widget.setValue() on the specific widget in the woody-model.
For end-user convenience a 'binding framework' is currently foreseen that enables you to 'declare' this binding rather then to program it.
The current implementation uses jxpath so it works for backends producing/expecting either XML documents or simple JavaBeans. It does not currently offer a declarative solution towards straight JDBC (ie sql statements and resultsets)
Having said that one angle of attack would be to use some OR/mapping or persistency framework that actually offers the simple JavaBean view on the relation data so you can use the declarative binding.
Second approach is just to ignore existing binding and code it up (not that hard, use the code of the current binding framework as a guide. Your experience will probably yield enough insight for the design of:)
Final approach (no promises) would be to hookup declarative binding to JDBC sources in the binding framework.
As for the remaining decission: 'where do I write my (arbitrary) controlling logic' you could go for actions, but the new flow will easily lead you to a more comfortable state-management inside your use case (one will typically not mix both approaches)
I thought examples for calling the binding from both are to be found in the woody-samples section.
HTH, don't hesitate to ask more anr/or report progress
regards, -marc=
There's yet another concept I'd like to use together with this: flow. I had a look at the woody-flow samples. But again, how do the database actions fit in? Or are flow and actions just not compatible? What is the proposed way of database functionality? I'd rather like to avoid writing beans if possible, but...
Thanx Simon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center Read my weblog at http://radio.weblogs.com/0116284/ [EMAIL PROTECTED] [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
