EventType eventType = EventType.stringToType(request.getParameter(EventType.IDENTIFIER));
String draggedItemId = request.getParameter("draggedItemId");
// We need the body of the <li> tag, the component inside it
ChildrenFinder childrenFinder = new ChildrenFinder(draggedItemId);
component.getPage().visitChildren(childrenFinder);
if (childrenFinder.getFoundComponents().size() != 1)
throw new WicketRuntimeException("this should not happen");
Component sortedComponent = childrenFinder.getFoundComponents().get(0);
if (eventType == EventType.STOP) {
int newPosition = 0;
try {