if (onDragStopNotificationWanted) options.put(EventType.DRAG_END.getEventName(), new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl(false) + "&" + EventType.IDENTIFIER + "=" + EventType.DRAG_END + new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "&" + EventType.IDENTIFIER + "=" + EventType.DRAG + new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "&" + EventType.IDENTIFIER + "=" + EventType.DRAG_START + builder.append(new JsFunction("\njQuery(function(){jQuery('#" + getComponent().getMarkupId() + "').attr('" + DraggablesAcceptedByDroppable.DRAG_NAME_IDENTIFIER + "', '" + name +
if (this.onDragStopNotificationWanted) { this.options.put(EventType.DRAG_END.getEventName(), new JsFunction("function() { wicketAjaxGet('" + new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "&" + EventType.IDENTIFIER + "=" + EventType.DRAG + new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "&" + EventType.IDENTIFIER + "=" + EventType.DRAG_START + builder.append(new JsFunction("\njQuery(function(){jQuery('#" + getComponent().getMarkupId() + "').attr('" + DraggablesAcceptedByDroppable.DRAG_NAME_IDENTIFIER + "', '" + this.name +
if (this.onDeactivateNotificationWanted) { this.options.put("deactivate", new JsFunction("function(ev,ui) { \n" + "wicketAjaxGet('" + this.getCallbackUrl() + new JsFunction("function(ev,ui) { \n" + "wicketAjaxGet('" + this.getCallbackUrl() + new JsFunction("function(ev,ui) { \n" + "wicketAjaxGet('" + this.getCallbackUrl() +
if (onBeforeShowNotificationWanted) options.put(EventType.BEFORE_SHOW.eventName, new JsFunction("function(dateText,inst) { wicketAjaxGet('" + this.getCallbackUrl() + "&" + EventType.IDENTIFIER + "=" + EventType.BEFORE_SHOW + new JsFunction("function(dateText,inst) { wicketAjaxGet('" + this.getCallbackUrl() + "&date='+dateText" + new JsFunction("function(dateText,inst) { wicketAjaxGet('" + this.getCallbackUrl() + "&date='+dateText" + new JsFunction("function(year,month,inst) { wicketAjaxGet('" + this.getCallbackUrl() + "&year='+year" + new JsFunction("function(date) { wicketAjaxGet('" + this.getCallbackUrl() + "&date='+date" +
if (onResizeStartNotificationWanted) options.put(EventType.RESIZE_START.eventName, new JsFunction("function(ev,ui) { wicketAjaxGet('" + this.getCallbackUrl() + "&height='+jQuery(ui.size).attr('height')" + new JsFunction("function(ev,ui) { wicketAjaxGet('" + this.getCallbackUrl() + "&height='+jQuery(ui.size).attr('height')" + new JsFunction("function(ev,ui) { wicketAjaxGet('" + this.getCallbackUrl() + "&height='+jQuery(ui.size).attr('height')" +
if (onDeactivateNotificationWanted) options.put("deactivate", new JsFunction("function(ev,ui) { \n"+ "wicketAjaxGet('" + this.getCallbackUrl() + new JsFunction("function(ev,ui) { \n"+ "wicketAjaxGet('" + this.getCallbackUrl() + new JsFunction("function(ev,ui) { \n"+ "wicketAjaxGet('" + this.getCallbackUrl() +
@Override protected JsBuilder getJsBuilder() { options.put(EventType.STOP.eventName, new JsFunction( "function(ev,ui) {" + "jQuery.handleSortStop('" + this.getCallbackUrl() + "',ui,'" + getComponent().getMarkupId() + "');" + new JsFunction( "function(ev,ui) {" + "jQuery.handleReceive('" + this.getCallbackUrl() + "',ui,'" + getComponent().getMarkupId() + "');" + new JsFunction( "function(ev,ui) {" + "jQuery.handleRemove('" + this.getCallbackUrl() + "',ui,'" + getComponent().getMarkupId() + "');" +
/** * Sets the 'helper' property for this draggable with a function. Please * consult the jQuery documentation for a detailed description of this property. * DraggableHelper can be used for values of "original" and "clone", or * a custom function can be used. * * @param function * @return this object */ public DraggableBehavior setHelper(final String function) { if (function == null) { this.options.remove("helper"); } else { this.options.put("helper", new JsFunction(function)); } return this; }
/** * You can restrict the {@link Component}s that can be dragged and dropped to * a {@link Component} marked with this behavior. See {@link DraggablesAcceptedByDroppable} * for more information. If the {@link DraggablesAcceptedByDroppable} is empty (i.e. it * contains no names) then the droppable does not accept any draggables. * * @param accepted the accepted * @return this object */ public DroppableBehavior setDraggablesAcceptedByDroppable(final DraggablesAcceptedByDroppable accepted) { this.draggablesAcceptedByDroppable = accepted; if (accepted != null) { this.options.put("accept", new JsFunction(accepted.getJsAcceptCheckerFunctionName())); } else { this.options.remove("accept"); } return this; }
/** You can restrict the {@link Component}s that can be dragged and dropped to * a {@link Component} marked with this behavior. See {@link DraggablesAcceptedByDroppable} * for more information. If the {@link DraggablesAcceptedByDroppable} is empty (i.e. it * contains no names) then the droppable does not accept any draggables. * * @param accepted the accepted * @return this object */ public DroppableBehavior setDraggablesAcceptedByDroppable(final DraggablesAcceptedByDroppable accepted) { draggablesAcceptedByDroppable = accepted; if (accepted != null) options.put("accept", new JsFunction(accepted.getJsAcceptCheckerFunctionName())); else options.remove("accept"); return this; }
/** * Sets the 'helper' property for this draggable with a function. Please * consult the jQuery documentation for a detailed description of this property. * DraggableHelper can be used for values of "original" and "clone", or * a custom function can be used. * @param function * @return this object */ public DraggableBehavior setHelper(final String function) { if (function == null) options.remove("helper"); else options.put("helper", new JsFunction(function)); return this; } public DraggableBehavior setHelper(final AjaxRequestTarget target, final String function) {
/** * Sets some default options. */ private void setDefaultOptions() { setContent(new JsFunction(defaultContent)); }