You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by depub2 <de...@mxsi.com> on 2005/01/25 02:36:20 UTC

CONTRIBUTION: repeater-widget (insert row): InsertRowsActionDefinition

Hello Folks,

I would like to make a small contribution to the cocoon repeater-widget
(insert row) and would like someone (Sylvain Wallez?) to accept my code; so
I'll be a "ghostwriter" as it does not make sense for me to maintain this
small piece of code.

Specifically, I would like to add something like:
  package org.apache.cocoon.forms.formmodel;
  public class InsertRowsActionDefinition extends RepeaterActionDefinition
{}

It will act like DeleteRowsActionDefinition; but instead will insert a
single row in front of each of the selected rows. This sure seems like a
natural need for the repeater! Yes?!?

I am now prototyping and testing the code and will provide it to the project
when I find someone (Sylvain Wallez??) who is willing to take responsibility
for it. How can I get it into the distribution so our next download of the
cocoon snapshot a few weeks from now will include it??


Best Regards,


David





Re: CONTRIBUTION: repeater-widget (insert row): InsertRowsActionDefinition

Posted by Sylvain Wallez <sy...@apache.org>.
depub2 wrote:

>Hello Folks,
>
>I would like to make a small contribution to the cocoon repeater-widget
>(insert row) and would like someone (Sylvain Wallez?) to accept my code; so
>I'll be a "ghostwriter" as it does not make sense for me to maintain this
>small piece of code.
>
>Specifically, I would like to add something like:
>  package org.apache.cocoon.forms.formmodel;
>  public class InsertRowsActionDefinition extends RepeaterActionDefinition
>{}
>
>It will act like DeleteRowsActionDefinition; but instead will insert a
>single row in front of each of the selected rows. This sure seems like a
>natural need for the repeater! Yes?!?
>  
>

Sorry, it doesn't seem natural to me, and I never saw such behaviour, 
particularily inserting several rows at once and inserting them before 
the selected row.

Now I understand that the set of available repeater-actions is currently 
limited, and that "add-row" that inserts a new row at the end of the 
repeater may not be the most convenient when you want to insert a row at 
an arbitrary place in the repeater (although you have the "add-after" 
row-action).

So IMO the behaviour of an "add-rows" action should be to add rows 
_after_ the selected rows. This kind of interaction usually involves a 
single selection, but we could find it acceptable that it is generalized 
to inserting a row after all selected rows.

What do people think?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Re: CONTRIBUTION: repeater-widget (insert row): InsertRowsActionDefinition

Posted by Andrew Savory <an...@luminas.co.uk>.
Hi David,

On 25 Jan 2005, at 01:36, depub2 wrote:

> I would like to make a small contribution to the cocoon repeater-widget
> (insert row) and would like someone (Sylvain Wallez?) to accept my  
> code; so
> I'll be a "ghostwriter" as it does not make sense for me to maintain  
> this
> small piece of code.

The best way to contribute this is to submit it as a patch via  
bugzilla, then as soon as someone (perhaps Sylvain!) gets a chance,  
they will be able to review it and add it to Cocoon.

Information on creating diffs can be found here:  
http://cocoon.apache.org/community/ 
contrib.html#How+to+Generate+Differences

Bugzilla can be found here:
http://issues.apache.org/bugzilla/


Thanks,

Andrew.

--
Andrew Savory, Managing Director, Luminas Limited
Tel: +44 (0)870 741 6658  Fax: +44 (0)700 598 1135
Web: http://www.luminas.co.uk/
Orixo alliance: http://www.orixo.com/