Issue with Drag-drop's ServerSideCriteria

Hello,

  I have a issue with ServerSideCriteria. The ServerSideCriteria is evaluated inconsistently when a component is dragged. The steps I followed are:   
  1) Created AbsoluteLayout of size 500px x 300px.  
  2) Wrapped AbsoluteLayout inside DragAndDropWrapper
  3) Created a ServerSideCriterion and implmented accept() method, this method always returns true and makes a log entry.
  4) Specified DropHandler for the DragAndDropWrapper
      The getAcceptCriterion() method creates and return the ServerSideCriterion created in step-3)
  5) Created a button, set button width to 80px, wrapped the button inside DragAndDropWrapper and invoked setSizeUndefined()  and add the  DragAndDropWrapper to the AbsoluteLayout 

 Now when you drag the button the ServerSideCriterion will be evaluated and a log entry will be visible. The log entry is visible only few times. This means that the ServerSideCriterion is evaluated only in some cases. 

Is there a way to determine when will the ServerSideCriterion be evaluated?

Thanks

Here is the code

public class VddAbsLayoutApp extends Application {

@Override
public void init() {
	Window mainWindow = new Window("Test DD ServerSideCriterion");
	setMainWindow(mainWindow);
	
	createDDLayout();
}
public void createDDLayout() {
	Panel panel = new Panel();
	panel.setWidth("500px");	
	AbsoluteLayout layout = new AbsoluteLayout();
	layout.setWidth("500px");
	layout.setHeight("300px");
	
	DragAndDropWrapper ddLayoutWrapper = new DragAndDropWrapper(layout);		
	ddLayoutWrapper.setDropHandler(new DropHandler() {
		
		@Override
		public AcceptCriterion getAcceptCriterion() {
			// 
			return VCustScreenApplication.this.new SSCriteria();
		}
		
		@Override
		public void drop(DragAndDropEvent event) {
			// Processing of drop event
		}
	});
	

	DragAndDropWrapper btnDDWrapper =  new DragAndDropWrapper(new Button("Button"));
	btnDDWrapper.setDragStartMode(DragStartMode.WRAPPER);
	btnDDWrapper.setSizeUndefined();
	layout.addComponent(btnDDWrapper);
	
	((VerticalLayout)panel.getContent()).setMargin(false);
	panel.getContent().addComponent(ddLayoutWrapper);

	getMainWindow().addComponent(panel);		
}

private class SSCriteria extends ServerSideCriterion {

	@Override
	public boolean accept(DragAndDropEvent dragEvent) {
		// 
		System.out.println("--- Inside ServerSideCriterion.accept() ---");
		return true;
	}
	
}

}

Is there a way to determine when will the ServerSideCriterion be evaluated?

Thanks

Sorry for delay in posting but I figured out the answer.