cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Lane <ja...@root10.net>
Subject Re: databases and flow [again]
Date Sun, 13 Jun 2004 15:28:03 GMT
Thanks Joerg!

I'd actually solved the problem that prompted me to post the original 
message but I shall need this info later on, I have a just the form 
that will need this.

Many thanks ;)


On 12 Jun 2004, at 10:59, Joerg Heinicke wrote:

> On 10.06.2004 08:00, Derek Hohls wrote:
>
>> Does Cocoon ship with samples that show how
>> to access a database from a class... if not,
>> where we would find such?
>
> I guess not, but these samples would depend heavily on the persistence 
> framework. And, yes, OJB block comes with database access samples. If 
> you do th access in the flow script or in Java is up to you, I prefer 
> the latter.
>
> At the end the pseudo code looks like:
>
> form = instantiateForm(definitionURI);
> data = getData();
> form.load(data);
> form.showForm(sitemapURI);
> form.save(data);
> storeData(data);
> showResult();
>
> So you can separata the database access completely from the 
> flowscript. No need for generating flowscript on the fly.
>
> Joerg
>
>>>>> Couldn't I just generate the flow with the TextSerializer?
>>>>
>>>> Hä? I don't understand. Why generating flow with TextSerializer?
>>>>
>>>> I think SQLTransformer or ESQL-Logicsheet will be your friend:
>>>
>>> Yes that is good, but if I want to generate a flow.js from a DB? 
>>> Surely I need to out put to a text format, which .js is.
>>>
>>> So for example in my flow.js:
>>>
>>> var $0 = [
>>>    //these values from db
>>>    { key: "$1", value: "$2" },
>>> ];
>>>
>>> Where $0-2 are results of DB query.
>>>
>>> Sorry I'm sure I'm totally missing the point here ;(
>> Don't generate the flow script, but access the values from a class 
>> that accesses the database.
>> Joerg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
Jason Lane

Developer
Root10 developments


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


Mime
View raw message