You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Berin Loritsch <bl...@d-haven.org> on 2006/05/17 17:12:14 UTC
Continuations loosing state
It seems that when I use continuations that it is losing a lot of
state. My method and environment sets up a lot of information, but all
of it is lost every time I resume the continuation. Yet with CForms it
seems to save state properly. What gives? Is there some manual method
of saving and restoring state that I have to do? In short they are not
acting like proper continuations and instead are only maintaining the
program stack w/o state.
--
*Berin Loritsch*
Owner
*Work:* 571-215-7708
*Email:* bloritsch@d-haven.com <ma...@d-haven.com>
*IM:* bloritsch@d-haven.org (MSN)
*http://www.linkedin.com/in/bloritsch
*
* * *D-Haven* <http://d-haven.org>
20044 Great Falls Forest Dr.
<http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en>
Great Falls, VA 22066
USA
See who we know in common <http://www.linkedin.com/e/wwk/5678360/> Want
a signature like this? <http://www.linkedin.com/e/sig/5678360/>
Re: Continuations loosing state
Posted by Berin Loritsch <bl...@d-haven.org>.
Simone Gianni wrote:
> Hi Berin,
> what do you mean with state? Could you post an example of code and point
> out the unexpected behaviour?
>
I decided to work without them so the code is now gone. However, as an
example, I had an object called CountryHotTopics which had a list of
tags and the list of tags that were designated hot topics. The
reference to the object still exists and is resolved. However, the
contents of the object are gone.
--
*Berin Loritsch*
Owner
*Work:* 571-215-7708
*Email:* bloritsch@d-haven.com <ma...@d-haven.com>
*IM:* bloritsch@d-haven.org (MSN)
*http://www.linkedin.com/in/bloritsch
*
* * *D-Haven* <http://d-haven.org>
20044 Great Falls Forest Dr.
<http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en>
Great Falls, VA 22066
USA
See who we know in common <http://www.linkedin.com/e/wwk/5678360/> Want
a signature like this? <http://www.linkedin.com/e/sig/5678360/>
Re: Continuations loosing state
Posted by Simone Gianni <s....@thebug.it>.
Hi Berin,
what do you mean with state? Could you post an example of code and point
out the unexpected behaviour?
Simone
Berin Loritsch wrote:
> It seems that when I use continuations that it is losing a lot of
> state. My method and environment sets up a lot of information, but
> all of it is lost every time I resume the continuation. Yet with
> CForms it seems to save state properly. What gives? Is there some
> manual method of saving and restoring state that I have to do? In
> short they are not acting like proper continuations and instead are
> only maintaining the program stack w/o state.
>
> --
> *Berin Loritsch*
> Owner
>
> *Work:* 571-215-7708
> *Email:* bloritsch@d-haven.com <ma...@d-haven.com>
> *IM:* bloritsch@d-haven.org (MSN)
> *http://www.linkedin.com/in/bloritsch
> *
> * * *D-Haven* <http://d-haven.org>
> 20044 Great Falls Forest Dr.
> <http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en>
> Great Falls, VA 22066
> USA
>
> See who we know in common <http://www.linkedin.com/e/wwk/5678360/>
> Want a signature like this? <http://www.linkedin.com/e/sig/5678360/>
>
--
Simone Gianni
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: paged cforms
Posted by Simone Gianni <s....@thebug.it>.
Hi Lee,
if you need paged repeater support there is a patch for this on Jira. It
has not yet been applied to the code, but you can get it and try if it
works for you. The bug is http://issues.apache.org/jira/browse/COCOON-1220 .
Hope this helps,
Simone
Lee Carroll wrote:
> Hi I'm using xsp generated xml to bind to a cform model. On submit of
> the form i use a save xsp to update the backend.
>
> The form presents a lot of data entry and would benifit from paging
> the data. On each submit the flowscript would need to present the next
> part of the data until all done.
>
> Has anyone done anything like this ? It sort of sounds like a commom
> problem which people may well have solved ?
>
> Any pointers greatly appreciated
>
> lee c
--
Simone Gianni
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
AW: paged cforms
Posted by Christofer Dutz <du...@c-ware.de>.
Hi,
Unfortunately the union-stuff works for separate widgets. A repeater is one
single widget. No matter how many entries it has, so you can't page it using
this approach.
On the other side I would recommend evaluating if CForms is necessary. While
working on a logistic portal using CForms using a repeater only to display
information and perform simple actions on the rows (delete, actions on
selected rows) and not to directly edit them, I found out, that avoiding
CForms for the big tables speed up my application about 14 times. I then
could use very simple techniques to implement paging.
As someone else on this list mentioned there are some attempts to implement
paging repeaters, don't know how work is proceeding.
Chris
_____
Von: Lee Carroll [mailto:leecarroll150@aol.com]
Gesendet: Samstag, 20. Mai 2006 12:23
An: users@cocoon.apache.org
Betreff: RE: paged cforms
hi Chris,
Thanks for the response.
My form is a repeater, with a variable length depending upon the number of
records in the db table. I'd page say after 20 records?
The union approach looks cool but as you say would not work here.
lc
RE: paged cforms
Posted by Lee Carroll <le...@aol.com>.
hi Chris,
Thanks for the response.
My form is a repeater, with a variable length depending upon the number of
records in the db table. I'd page say after 20 records?
The union approach looks cool but as you say would not work here.
lc
AW: paged cforms
Posted by Christofer Dutz <du...@c-ware.de>.
Uuuuppps
just a smalll bug here ;)
<fd:union id="view" case="viewType">
<fd:widgets>
<fd:struct id="page_1">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
<fd:struct id=" page_2">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
<fd:struct id=" page_3">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
</fd:widgets>
</fd:union>
Chris
[ c h r i s t o f e r d u t z ]
IT-Berater
univativ GmbH & Co. KG
Robert-Bosch-Str. 7, 64293 Darmstadt
fon: 0 61 51 / 66 717 -0
fax: 0 61 51 / 66 717 -29
email: christofer.dutz@univativ.de
<http://www.univativ.de/> http://www.univativ.de
Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
_____
Von: Christofer Dutz [mailto:dutz@c-ware.de]
Gesendet: Freitag, 19. Mai 2006 11:33
An: users@cocoon.apache.org
Betreff: AW: paged cforms
Hi
If you are using just a big form, then you can use unions to achieve paging.
Note that this doesnt work if you want pages for a large repeater.
For the big-form-paging you simply use the following structure:
<fd:field id="viewType">
<fd:datatype base="string"/>
<fd:selection-list>
<fd:item value="page_1">
<fd:label>Page
1</fd:label>
</fd:item>
<fd:item value="page_2">
<fd:label>Page
2</fd:label>
</fd:item>
<fd:item value="page_3">
<fd:label>Page
3</fd:label>
</fd:item>
</fd:selection-list>
</fd:field>
<fd:union id="view" case="viewType">
<fd:widgets>
<fd:struct id="details">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
<fd:struct id="details">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
<fd:struct id="details">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
</fd:widgets>
</fd:union>
You can then make a button to update the hidden widget viewType which
submits on change and you have what you want.
Hope this helps,
Chris
[ c h r i s t o f e r d u t z ]
IT-Berater
univativ GmbH & Co. KG
Robert-Bosch-Str. 7, 64293 Darmstadt
fon: 0 61 51 / 66 717 -0
fax: 0 61 51 / 66 717 -29
email: christofer.dutz@univativ.de
<http://www.univativ.de/> http://www.univativ.de
Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
_____
Von: Lee Carroll [mailto:leecarroll150@aol.com]
Gesendet: Freitag, 19. Mai 2006 10:28
An: users@cocoon.apache.org
Betreff: paged cforms
Hi I'm using xsp generated xml to bind to a cform model. On submit of the
form i use a save xsp to update the backend.
The form presents a lot of data entry and would benifit from paging the
data. On each submit the flowscript would need to present the next part of
the data until all done.
Has anyone done anything like this ? It sort of sounds like a commom problem
which people may well have solved ?
Any pointers greatly appreciated
lee c
AW: paged cforms
Posted by Christofer Dutz <du...@c-ware.de>.
Hi
If you are using just a big form, then you can use unions to achieve paging.
Note that this doesnt work if you want pages for a large repeater.
For the big-form-paging you simply use the following structure:
<fd:field id="viewType">
<fd:datatype base="string"/>
<fd:selection-list>
<fd:item value="page_1">
<fd:label>Page
1</fd:label>
</fd:item>
<fd:item value="page_2">
<fd:label>Page
2</fd:label>
</fd:item>
<fd:item value="page_3">
<fd:label>Page
3</fd:label>
</fd:item>
</fd:selection-list>
</fd:field>
<fd:union id="view" case="viewType">
<fd:widgets>
<fd:struct id="details">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
<fd:struct id="details">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
<fd:struct id="details">
<fd:widgets>
.
</fd:widgets>
</fd:struct>
</fd:widgets>
</fd:union>
You can then make a button to update the hidden widget viewType which
submits on change and you have what you want.
Hope this helps,
Chris
[ c h r i s t o f e r d u t z ]
IT-Berater
univativ GmbH & Co. KG
Robert-Bosch-Str. 7, 64293 Darmstadt
fon: 0 61 51 / 66 717 -0
fax: 0 61 51 / 66 717 -29
email: christofer.dutz@univativ.de
<http://www.univativ.de/> http://www.univativ.de
Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
_____
Von: Lee Carroll [mailto:leecarroll150@aol.com]
Gesendet: Freitag, 19. Mai 2006 10:28
An: users@cocoon.apache.org
Betreff: paged cforms
Hi I'm using xsp generated xml to bind to a cform model. On submit of the
form i use a save xsp to update the backend.
The form presents a lot of data entry and would benifit from paging the
data. On each submit the flowscript would need to present the next part of
the data until all done.
Has anyone done anything like this ? It sort of sounds like a commom problem
which people may well have solved ?
Any pointers greatly appreciated
lee c
paged cforms
Posted by Lee Carroll <le...@aol.com>.
Hi I'm using xsp generated xml to bind to a cform model. On submit of the form i use a save xsp to update the backend.
The form presents a lot of data entry and would benifit from paging the data. On each submit the flowscript would need to present the next part of the data until all done.
Has anyone done anything like this ? It sort of sounds like a commom problem which people may well have solved ?
Any pointers greatly appreciated
lee c