@Override
  public void onConfigure(Component component) {
    super.onConfigure(component);

    this.setOption("drop", this.onDropAjaxBehavior.getCallbackFunction());

    if (this.onDragEnterAjaxBehavior != null) {
      this.setOption("dragenter", this.onDragEnterAjaxBehavior.getCallbackFunction());
    }

    if (this.onDragLeaveAjaxBehavior != null) {
      this.setOption("dragleave", this.onDragLeaveAjaxBehavior.getCallbackFunction());
    }
  }
  @Override
  public void bind(Component component) {
    super.bind(component);

    this.onDropAjaxBehavior = this.newOnDropAjaxBehavior(this, this.getOnDropStatement());
    component.add(this.onDropAjaxBehavior);

    // these events are not enabled by default to prevent unnecessary server round-trips.
    if (this.listener.isDragEnterEventEnabled()) {
      this.onDragEnterAjaxBehavior =
          this.newOnDragEnterAjaxBehavior(this, this.getOnDragEnterStatement());
      component.add(this.onDragEnterAjaxBehavior);
    }

    if (this.listener.isDragLeaveEventEnabled()) {
      this.onDragLeaveAjaxBehavior =
          this.newOnDragLeaveAjaxBehavior(this, this.getOnDragLeaveStatement());
      component.add(this.onDragLeaveAjaxBehavior);
    }
  }