You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Thorsten Scherler <th...@apache.org> on 2006/01/05 11:11:14 UTC

[CForms] Move to postion

Hi all,

I would like to implement a row action "move-to-position". 

We have already move-up and move-down, but I would like to move the row
to an user specific position. You have an input box ("new-position") for
each row where you define the new position for the row.

I defined a new action "MoveToPositionDefinition{}" in the
RowActionDefinition based on "MoveUpDefinition{}" and my corresponding
form stuff.

Now my question is the following:
What is the best way to get the value of the "new-position" box in the
definition?

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [CForms] Move to postion

Posted by Sylvain Wallez <sy...@apache.org>.
Thorsten Scherler wrote:
> El jue, 05-01-2006 a las 11:26 +0100, Sylvain Wallez escribió:
>   
>> Thorsten Scherler wrote:
>>     
>>> Hi all,
>>>
>>> I would like to implement a row action "move-to-position". 
>>>
>>> We have already move-up and move-down, but I would like to move the row
>>> to an user specific position. You have an input box ("new-position") for
>>> each row where you define the new position for the row.
>>>   
>>>       
>>  From a usability point of view, this looks a bit weird...
>>
>> And as we speak, I'm working on drag'n drop reordering of repeater rows. 
>> Using DnD in tables is quirky (I understand now why Dojo and 
>> Scriptaculous demos are all list-based) but I'm progressing.
>>     
>
> :) jeje very nice. :) 
>
> Actually this would solve my usecase perfectly. My form is a nested
> repeater. The user want to move the repeater rows to any given position
> and not by clicking 20 times up. ;-)
>
> When do you think it is ready to test. ;-)
>   

This is part of a set of Ajax goodies that have to be finished 1st half 
of February. But expect them to land incrementally in the repository 
until then :-)

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Re: [CForms] Move to postion

Posted by Thorsten Scherler <th...@apache.org>.
El jue, 05-01-2006 a las 11:26 +0100, Sylvain Wallez escribió:
> Thorsten Scherler wrote:
> > Hi all,
> >
> > I would like to implement a row action "move-to-position". 
> >
> > We have already move-up and move-down, but I would like to move the row
> > to an user specific position. You have an input box ("new-position") for
> > each row where you define the new position for the row.
> >   
> 
>  From a usability point of view, this looks a bit weird...
> 
> And as we speak, I'm working on drag'n drop reordering of repeater rows. 
> Using DnD in tables is quirky (I understand now why Dojo and 
> Scriptaculous demos are all list-based) but I'm progressing.

:) jeje very nice. :) 

Actually this would solve my usecase perfectly. My form is a nested
repeater. The user want to move the repeater rows to any given position
and not by clicking 20 times up. ;-)

When do you think it is ready to test. ;-)

> 
> > I defined a new action "MoveToPositionDefinition{}" in the
> > RowActionDefinition based on "MoveUpDefinition{}" and my corresponding
> > form stuff.
> >
> > Now my question is the following:
> > What is the best way to get the value of the "new-position" box in the
> > definition?
> >   
> 
> I'm more and more thinking that a repeater needs to have child widgets 
> that are not in rows, 

Yes, I agree. In my use case I ended up to add tmp variable to the form
where it would have been easier to use child widgets directly.

> i.e. a repeater is a container for rows (which are 
> themselves containers) _and_ other widgets, such as repeater actions.
> 

+1

> Also, I think the selection must be a feature of the repeater, rather 
> than through a boolean field that has to be manually added as of today. 

+1 makes the template lot cleaner

> That would allow to define at the repeater level if selection is 
> allowed, and if it single or multiple. Also that would allow to have 
> repeater.getSelectedRows().
> 
> WDYT?

Yeah, very nice. 

Thanks Sylvain

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [CForms] Move to postion

Posted by Sylvain Wallez <sy...@apache.org>.
Thorsten Scherler wrote:
> Hi all,
>
> I would like to implement a row action "move-to-position". 
>
> We have already move-up and move-down, but I would like to move the row
> to an user specific position. You have an input box ("new-position") for
> each row where you define the new position for the row.
>   

 From a usability point of view, this looks a bit weird...

And as we speak, I'm working on drag'n drop reordering of repeater rows. 
Using DnD in tables is quirky (I understand now why Dojo and 
Scriptaculous demos are all list-based) but I'm progressing.

> I defined a new action "MoveToPositionDefinition{}" in the
> RowActionDefinition based on "MoveUpDefinition{}" and my corresponding
> form stuff.
>
> Now my question is the following:
> What is the best way to get the value of the "new-position" box in the
> definition?
>   

I'm more and more thinking that a repeater needs to have child widgets 
that are not in rows, i.e. a repeater is a container for rows (which are 
themselves containers) _and_ other widgets, such as repeater actions.

Also, I think the selection must be a feature of the repeater, rather 
than through a boolean field that has to be manually added as of today. 
That would allow to define at the repeater level if selection is 
allowed, and if it single or multiple. Also that would allow to have 
repeater.getSelectedRows().

WDYT?

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director