cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <mailingli...@c-ware.de>
Subject AW: CForms Serialization
Date Wed, 21 Jan 2009 08:06:43 GMT
Hi Ralph,

it should be possible, if you extract the data from the form and persist
that.

I think you could add a parameter to a submit-widget to not validate the
form (this would be the easiest way), this way you can return to your
flowscript or javaflow and continue processing. Alternatively you could add
a link on your form for example "save form" that passes the current
continuation-id as a parameter to a save-url (Be sure to have the most
recent continuation id in Ajax enabled forms). In the logic for processing
this url, you could use the continuation-id, to get the form instance and
continue-from there (to see how this is done ... have a look at the
suggestion-list generator.

If you use form.save(previouslySavedFormData) to save your forms content to
a java-pojo or w3c.dom there should be no problems in persisting them ... as
soon as the user wants to continue: form.load(previouslySavedFormData); and
you should be ready to continue.

Hope this helps,
    Chris






-----Urspr√ľngliche Nachricht-----
Von: Ralph Rauscher [mailto:rra@blue-elephant-systems.com] 
Gesendet: Dienstag, 20. Januar 2009 23:43
An: users@cocoon.apache.org
Betreff: CForms Serialization

Hi,

I have a case where I have a really large form that would require 
several sessions to be valid and I'd like to allow users to persist 
their work (even if the form is invalid) and continue working on it later.

As the cforms binding will throw all kinds of exceptions in this case I 
thought about serializing the Form object using standard Java object 
serialization.

So far Form and the classes it's derived from do not implement 
Serializable, which would be easy to fix. I saw a remark though by 
Sylvain where he mentions

/"a form contains its own data model, which can be serialized, but also 
pointers to its definition, which is shared between form instances and 
can contain arbitrary references to non-serializable objects and components"

/So, is it possible?

Thanks.


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




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


Mime
View raw message