You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lee Carroll <le...@aol.com> on 2006/05/19 10:27:40 UTC

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

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 doesn’t 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 doesn’t 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