cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: FLOW & inserting data to SQL
Date Tue, 27 Jan 2004 19:06:22 GMT
On 27.01.2004 13:14, Joose Vettenranta wrote:
> Hello,
> 
> I've seen lot's of discussion back and forward on the subject "how to to 
> save/retrieve data from SQL-server from flow-script" but I have never 
> really seen any answers how to do that. So, how can I do simple UPDATE 
> command to database from flow script?

Don't do this in the FlowScript because it is only the controller. 
Updating the model is part of business logic and so do this stuff in 
Java classes that you call from the flow script: Separation of Concerns.

Joerg

> basic structure of my flow script is:
> 
> do {
>   SendPageAndWait ("foo", "page: page);
>   if (cocoon.request.get (stuff) matches logical expression)) {
>     UPDATE table SET stuff=valueFromForm
>     page++;
>   }
> } while (page < 10);
> 
> that is the basic structure of the flow script I'm trying to create.
> 
> - Joose

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


Mime
View raw message