Change mouse cursor over drag and drop targets?

Is there a way to change the mouse cursor during drag and drop? I would like to have the cursor change tied to the accept criterion.

There are two basic techniques that you can use.

  1. You can set the pointer type in CSS with the cursor property, as is
    done here
    . You can set it individually for different drag targets or to a layout.

  2. If you use the ServerSideCriterion, you can kind of catch mouse move activity while dragging. For example, when the mouse hovers over an item, you can probably change the pointer type. The problem is that there is no “mouse out” event, so the solution may not be perfect. The ServerSideCriterion is also heavyish because of all the server requests.

A client-side solution is, of course, always the ultimate solution.