You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/02/16 09:44:26 UTC

Combining database actions and Woody

In the Cocoon sample set for modular database actions,
the author says:

"Note,  that we do no parameter validation here, just see if 
some parameters are present. For a real application, you'd  
want to check their values as well. "

* First question - has anyone created an application that uses
Woody form processing to do some data validation before the
map:act processing takes over - if so, even a simple example
of how best to integrate all the myriad files would be appreciated!


The author of the example also says:

"Note too, that in a more complex setup you'd want to use an action 
set for this rather than spell it out everywhere."

* Second question: Has anyone got an example of how this might
work and how it might change (improve?) the example as shown?


Thanks
Derek

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Combining database actions and Woody

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Derek Hohls wrote:

> In the Cocoon sample set for modular database actions,
> the author says:
> 
> "Note,  that we do no parameter validation here, just see if 
> some parameters are present. For a real application, you'd  
> want to check their values as well. "
> 
> * First question - has anyone created an application that uses
> Woody form processing to do some data validation before the
> map:act processing takes over - if so, even a simple example
> of how best to integrate all the myriad files would be appreciated!

I haven't done this. But one idea might be to access the data through
JXPath and tweak a little the defaults for the actions, so that table
and attribute are not separated by "." but by "/" and setting a prefix
or whatever. If you can access the object holding the data through an
input module, you're almost done.
Since I haven't done this, I cannot provide much more than this.

However, you should seriously consider to use a persistence layer
like OJB or Hibernate. The database actions are really very similar
but less powerful.

> The author of the example also says:
> 
> "Note too, that in a more complex setup you'd want to use an action 
> set for this rather than spell it out everywhere."
> 
> * Second question: Has anyone got an example of how this might
> work and how it might change (improve?) the example as shown?

In an action set the action to fire is dependent on a parameter named
"cocoon-action" (IIRC this can be changed). So you group several actions
into a set and reference only the set in your pipeline.

HTH

	Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org