// Turn the model's vector into a collection
ArrayList items = new ArrayList();
for (Enumeration e = rightModel.elements(); e.hasMoreElements(); )
items.add(e.nextElement());
SortEditCommand cmd = new SortEditCommand(query, items);
cmd.perform();
commands.add(cmd);
}