cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurent Trillaud" <ltrill...@jouve.fr>
Subject RE : Persistance Storage with XMLForm and Flowscript?
Date Thu, 17 Apr 2003 07:53:54 GMT
Hugo
I have already read your cocoon sample and your previous wiki page about
Hibernate, but it isn't really what I'm looking for.

I'm trying to avoid using Java, because my final challenge is to
dynamically generate XMLForm, schematron and flow script files based on
XML Schema and some others information.

Therefore, right now, my problem is to populate the variable 'bean' in
the flow script with a database. 
Instead to have
... sniplet
    var bean = {
        firstName: "Donald",
        lastName: "Duck",
    }
    xform.setModel ( bean );
... /sniplet
I would like something like
... sniplet
    var bean = getXmlNodeFromDB(
        "xmldb:xindice://localhost:4080/MyCollection/MyDoc");
    xform.setModel ( bean );
... /sniplet

Laurent Trillaud

-----Message d'origine-----
De : Hugo Burm [mailto:hugob@xs4all.nl] 
Envoyé : mercredi 16 avril 2003 18:44
À : cocoon-users@xml.apache.org
Objet : RE: Persistance Storage with XMLForm and Flowscript?

Hello,

I don't understand what you want to do with a DOM representation. I
would
suggest to store your data in a Javabean and use this bean from
Flowscript.
That is easy. See the prefs example below. And then find a way to make
your
bean persistent. One of the solutions is Hibernate.

I just ported the flowscript "prefs" example
(http://localhost:8080/cocoon/samples/flow/prefs/)
to XMLForm and I am using Hibernate to make the data persistent.
The user data is now stored in a Mysql database. (In the original
example it
was stored in a hashmap in memory)

I am writing a Wiki page about this. It should arrive before the
weekend.
For Hibernate in combination with Cocoon see one of the older Wiki
pages:
http://wiki.cocoondev.org/Wiki.jsp?page=UsingHibernateToMakeYourJavaBean
sPer
sistent

Hugo Burm

-----Original Message-----
From: Laurent Trillaud [mailto:ltrillaud@jouve.fr]
Sent: Wednesday, April 16, 2003 4:02 PM
To: cocoon-users@xml.apache.org
Subject: Persistance Storage with XMLForm and Flowscript?


Hi,
I'm using XMLForm with Flowscript as describe in the cocoon
samples/xmlform/flow.
But I would like to implement persistence storage: to retrieved
information from a file system or a database to populate the form and to
save it when the wizard finish.
With the flowscript version of the XMLForm, the Model is handle in
javascript with this few line

... sniplet
    var bean = {
        firstName: "Donald",
        lastName: "Duck",
    }
    xform.setModel ( bean );
... /sniplet

How can I give a DOM to the setModel function?
Thanks in advance
Laurent Trillaud


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



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



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


Mime
View raw message