[Infusion-users] Getting the order of a Movables group?

Colin Clark colin.clark at utoronto.ca
Tue Jul 14 21:27:55 UTC 2009

Hey Kevin,

Welcome to the community!

The Reorderer has an afterMove event that you can register a listener  
for. It fires every time the user moves an item with either the  
keyboard or the mouse. The arguments to afterMove include:

  1. The item that was moved.
  2. A requestedPosition object, containing the drop target and the  
position relative to it (BEFORE, AFTER, INSIDE, or REPLACE)
  3. The list of all moveables, in their current order

All the List Reorderer events are documented on this page:

You can register a listener for afterMove in the options you pass to  
the reorderer, like this:

var myReorderer = fluid.reorderList(listContainer, {
	listeners: {
		afterMove: function (item, requestedPosition, movables) {
			// Do something after an item has been moved around.

Alternatively, if you don't want to register for an event that will  
fire every time an element gets moved, you can just go to the DOM to  
get the list of your items whenever you want. So, if you wanted to  
create an Update button like you suggest, you might just do something  
like this:

$("#updateButton).click(function () {
     var movables = myReorderer.locate("movables"); // This returns a  
jQuery instance with the movable items in current order.
     // Do something with the order of your movable items.

I hope this helps. Let me know if I can answer any more questions,


On 10-Jul-09, at 6:25 PM, Kevin Wilkinson UCI wrote:

> Hey ya'll, new to project Fluid.  So, previously I had built a task  
> list using Jquery's sortables.  When I found Fluid I decided I  
> wanted to make the change since it's better navigated using the  
> keyboard and such.  While I have the task list properly implementing  
> movable, I need a way to get the current order of the moveables once  
> the user reorders them so I can save the new order.  Now I have seen  
> examples of other people having an "update" button to save it, so  
> I'm assuming there is a way to get the order, but they don't share  
> their source code.  I've been looking through the documentation wiki  
> and I can't make heads or tails of any method that would return the  
> current order.  So what is it?  Can I simply call on Jquery's old  
> method I was using(movable extends sortables)?  Or is there some  
> other secret that I'm missing?
> Thanks for the help!
> _______________________________________________
> Infusion-users mailing list
> Infusion-users at fluidproject.org
> http://fluidproject.org/mailman/listinfo/infusion-users

Colin Clark
Technical Lead, Fluid Project
Adaptive Technology Resource Centre, University of Toronto

More information about the Infusion-users mailing list