Re: Sorting a list

2008-03-07 Thread jeredm

That is the library that Ryan had  a Wicket wrapper for that I tried and
couldn't get working.  The onblur may work.  I will have to build a test to
see if it is too much for the feel I am looking for.  Thanks everybody for
the great ideas!

Nino.Martinez wrote:
> 
> hmm what about this one?
> 
> http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo
> 
> Not sure if its in the scriptaculous integration though..
> 
> regards Nino
> 
> PS if you want a reload to occur, could'nt just add an onchange/onblur 
> behavior where you enter the row number? that way if the user enters 
> something it will move there ..?
> 
> jeredm wrote:
>> I was thinking about the move up/move down solutions, but my list is too
>> large.  I have found that with lists more than a few rows tall, the user
>> starts using the fork to eye technique.  For now I am just going to
>> implment
>> the sort in the db...so each row gets the row's number in a text box and
>> the
>> user can change the numbers to the correct order.  This solution does
>> work
>> well, but it can be a hassle as the rows don't move until the user clicks
>> save and the table reloads.
>>
>> Thomas Kappler-2 wrote:
>>   
>>> databinder has MoveUpButton and MoveDownButton, which do the job in
>>> ListViews.  If you don't use databinder, you can still have a look at
>>> the source.
>>>
>>> databinder.net
>>>
>>> Cheers,
>>> Thomas
>>>
>>>
>>> On Thu, Mar 6, 2008 at 6:35 PM, jeredm <[EMAIL PROTECTED]>
>>> wrote:
>>> 
>>>>  I should have been more clear that I need to create a control to allow
>>>> the
>>>>  user to change the order in a list.  I am able to sort the list before
>>>> it is
>>>>  rendered just fine.  What I need to do is to loop through the table
>>>> once
>>>> it
>>>>  has been re-ordered by the user and then set a sort order in the DB
>>>> based on
>>>>  the order of the rows in the table.
>>>>
>>>>  I believe the solution Ryan mentioned earlier in this thread is
>>>> capable
>>>> of
>>>>  doing what I need, but I have not been able to get it to work yet in
>>>> the
>>>>  context that I need it.  I was able to get his solution working with
>>>> an
>>>>  unordered list in a WebPage, but the panel I need the list/table on is
>>>>  swapped in via AJAX which seems to be creating a javascript error.
>>>>   
>>> ---------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>> 
>>
>>   
> 
> -- 
> -Wicket for love
> -Jme for fun
> 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sorting-a-list-tp15862619p15907810.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-07 Thread Nino Saturnino Martinez Vazquez Wael

hmm what about this one?

http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo

Not sure if its in the scriptaculous integration though..

regards Nino

PS if you want a reload to occur, could'nt just add an onchange/onblur 
behavior where you enter the row number? that way if the user enters 
something it will move there ..?


jeredm wrote:

I was thinking about the move up/move down solutions, but my list is too
large.  I have found that with lists more than a few rows tall, the user
starts using the fork to eye technique.  For now I am just going to implment
the sort in the db...so each row gets the row's number in a text box and the
user can change the numbers to the correct order.  This solution does work
well, but it can be a hassle as the rows don't move until the user clicks
save and the table reloads.

Thomas Kappler-2 wrote:
  

databinder has MoveUpButton and MoveDownButton, which do the job in
ListViews.  If you don't use databinder, you can still have a look at
the source.

databinder.net

Cheers,
Thomas


On Thu, Mar 6, 2008 at 6:35 PM, jeredm <[EMAIL PROTECTED]>
wrote:


 I should have been more clear that I need to create a control to allow
the
 user to change the order in a list.  I am able to sort the list before
it is
 rendered just fine.  What I need to do is to loop through the table once
it
 has been re-ordered by the user and then set a sort order in the DB
based on
 the order of the rows in the table.

 I believe the solution Ryan mentioned earlier in this thread is capable
of
 doing what I need, but I have not been able to get it to work yet in the
 context that I need it.  I was able to get his solution working with an
 unordered list in a WebPage, but the panel I need the list/table on is
 swapped in via AJAX which seems to be creating a javascript error.
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-07 Thread jeredm

I was thinking about the move up/move down solutions, but my list is too
large.  I have found that with lists more than a few rows tall, the user
starts using the fork to eye technique.  For now I am just going to implment
the sort in the db...so each row gets the row's number in a text box and the
user can change the numbers to the correct order.  This solution does work
well, but it can be a hassle as the rows don't move until the user clicks
save and the table reloads.

Thomas Kappler-2 wrote:
> 
> databinder has MoveUpButton and MoveDownButton, which do the job in
> ListViews.  If you don't use databinder, you can still have a look at
> the source.
> 
> databinder.net
> 
> Cheers,
> Thomas
> 
> 
> On Thu, Mar 6, 2008 at 6:35 PM, jeredm <[EMAIL PROTECTED]>
> wrote:
>>
>>  I should have been more clear that I need to create a control to allow
>> the
>>  user to change the order in a list.  I am able to sort the list before
>> it is
>>  rendered just fine.  What I need to do is to loop through the table once
>> it
>>  has been re-ordered by the user and then set a sort order in the DB
>> based on
>>  the order of the rows in the table.
>>
>>  I believe the solution Ryan mentioned earlier in this thread is capable
>> of
>>  doing what I need, but I have not been able to get it to work yet in the
>>  context that I need it.  I was able to get his solution working with an
>>  unordered list in a WebPage, but the panel I need the list/table on is
>>  swapped in via AJAX which seems to be creating a javascript error.
> 
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sorting-a-list-tp15862619p15901245.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-06 Thread Thomas Kappler
databinder has MoveUpButton and MoveDownButton, which do the job in
ListViews.  If you don't use databinder, you can still have a look at
the source.

databinder.net

Cheers,
Thomas


On Thu, Mar 6, 2008 at 6:35 PM, jeredm <[EMAIL PROTECTED]> wrote:
>
>  I should have been more clear that I need to create a control to allow the
>  user to change the order in a list.  I am able to sort the list before it is
>  rendered just fine.  What I need to do is to loop through the table once it
>  has been re-ordered by the user and then set a sort order in the DB based on
>  the order of the rows in the table.
>
>  I believe the solution Ryan mentioned earlier in this thread is capable of
>  doing what I need, but I have not been able to get it to work yet in the
>  context that I need it.  I was able to get his solution working with an
>  unordered list in a WebPage, but the panel I need the list/table on is
>  swapped in via AJAX which seems to be creating a javascript error.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-06 Thread jeredm

I should have been more clear that I need to create a control to allow the
user to change the order in a list.  I am able to sort the list before it is
rendered just fine.  What I need to do is to loop through the table once it
has been re-ordered by the user and then set a sort order in the DB based on
the order of the rows in the table.

I believe the solution Ryan mentioned earlier in this thread is capable of
doing what I need, but I have not been able to get it to work yet in the
context that I need it.  I was able to get his solution working with an
unordered list in a WebPage, but the panel I need the list/table on is
swapped in via AJAX which seems to be creating a javascript error.


Johan Compagner wrote:
> 
> the wicket way would be to sort it in java. use Arrays.sort and a
> comparator
> 
> johan
> 
> 
> 
> On Thu, Mar 6, 2008 at 12:00 AM, jeredm <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> I am looking for an easy way to sort single items within a
>> list...basically I
>> need to re-order a list.  For example, I have 30 table rows and I want to
>> move row 13 to be before row 10.  An example I found that is similar to
>> what
>> I am looking for is located at http://demos.mootools.net/Sortables.  Does
>> anybody know an easy way to implement this type of solution (an easy to
>> re-order list) in Wicket?  My list size is probably more than 10 and less
>> than 100.  Thanks for any help!
>> --
>> View this message in context:
>> http://www.nabble.com/Sorting-a-list-tp15862619p15862619.html
>> Sent from the Wicket - User mailing list archive at
>> Nabble.com<http://nabble.com/>
>> .
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sorting-a-list-tp15862619p15879305.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sorting a list

2008-03-06 Thread Johan Compagner
the wicket way would be to sort it in java. use Arrays.sort and a comparator

johan



On Thu, Mar 6, 2008 at 12:00 AM, jeredm <[EMAIL PROTECTED]>
wrote:

>
> I am looking for an easy way to sort single items within a
> list...basically I
> need to re-order a list.  For example, I have 30 table rows and I want to
> move row 13 to be before row 10.  An example I found that is similar to
> what
> I am looking for is located at http://demos.mootools.net/Sortables.  Does
> anybody know an easy way to implement this type of solution (an easy to
> re-order list) in Wicket?  My list size is probably more than 10 and less
> than 100.  Thanks for any help!
> --
> View this message in context:
> http://www.nabble.com/Sorting-a-list-tp15862619p15862619.html
> Sent from the Wicket - User mailing list archive at 
> Nabble.com<http://nabble.com/>
> .
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Sorting a list

2008-03-05 Thread Ryan Sonnek
there's a wicket project that integrates the scriptaculous sortable
object which might be what you're looking for:
http://wicketstuff.org/confluence/display/STUFFWIKI/Script.aculo.us+SortableListView


On Wed, Mar 5, 2008 at 5:00 PM, jeredm <[EMAIL PROTECTED]> wrote:
>
>  I am looking for an easy way to sort single items within a list...basically I
>  need to re-order a list.  For example, I have 30 table rows and I want to
>  move row 13 to be before row 10.  An example I found that is similar to what
>  I am looking for is located at http://demos.mootools.net/Sortables.  Does
>  anybody know an easy way to implement this type of solution (an easy to
>  re-order list) in Wicket?  My list size is probably more than 10 and less
>  than 100.  Thanks for any help!
>  --
>  View this message in context: 
> http://www.nabble.com/Sorting-a-list-tp15862619p15862619.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Sorting a list

2008-03-05 Thread jeredm

I am looking for an easy way to sort single items within a list...basically I
need to re-order a list.  For example, I have 30 table rows and I want to
move row 13 to be before row 10.  An example I found that is similar to what
I am looking for is located at http://demos.mootools.net/Sortables.  Does
anybody know an easy way to implement this type of solution (an easy to
re-order list) in Wicket?  My list size is probably more than 10 and less
than 100.  Thanks for any help!
-- 
View this message in context: 
http://www.nabble.com/Sorting-a-list-tp15862619p15862619.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]