@Override protected JsBuilder getJsBuilder() { if (onResizeStartNotificationWanted) options.put(EventType.RESIZE_START.eventName, new JsFunction("function(ev,ui) { wicketAjaxGet('" + this.getCallbackUrl() + "); }")); else options.remove(EventType.RESIZE_START.getEventName()); options.put(EventType.RESIZE_END.eventName, new JsFunction("function(ev,ui) { wicketAjaxGet('" + this.getCallbackUrl() + options.put(EventType.RESIZE.eventName, new JsFunction("function(ev,ui) { wicketAjaxGet('" + this.getCallbackUrl() + "); }")); else options.remove(EventType.RESIZE.getEventName()); builder.append(options.toString(rawOptions)); builder.append("}"); builder.append(");");
options.put("deactivate", new JsFunction("function(ev,ui) { \n"+ "wicketAjaxGet('" + "); }")); options.put("drop", new JsFunction("function(ev,ui) { \n"+ "wicketAjaxGet('" + options.put("activate", new JsFunction("function(ev,ui) { \n"+ "wicketAjaxGet('" + builder.append(options.toString(rawOptions)); builder.append("}"); builder.append(");");
public void append(final Object object) { if (object instanceof JsMap) ((JsMap)object).toString(buffer, null); else if (object instanceof Boolean) buffer.append(((Boolean)object).toString()); else if (object instanceof JsFunction) ((JsFunction)object).toString(buffer); else if (object instanceof String[]) { buffer.append("["); boolean first = true; for (String s : (String[])object) { if (!first) buffer.append(","); buffer.append("'"); buffer.append(s); buffer.append("'"); first = false; } buffer.append("]"); } else { buffer.append(object.toString()); } }
/** * Sets the default 'placeholder' property for this sortable: 'ui-state-highlight'. Please consult the * jquery documentation for a detailled description of this property. * @return this object */ public SortableBehavior setPlaceholder() { options.put("placeholder", "ui-state-highlight"); return this; } public SortableBehavior setPlaceholder(final AjaxRequestTarget target) {
options.put(EventType.DRAG_END.getEventName(), new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl(false) + "); }")); else options.remove(EventType.DRAG_END.getEventName()); options.put(EventType.DRAG.getEventName(), new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "); }")); else options.remove(EventType.DRAG.getEventName()); options.put(EventType.DRAG_START.getEventName(), new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "); }")); else options.remove(EventType.DRAG_START.getEventName()); builder.append(options.toString(rawOptions)); builder.append("}"); builder.append(");");
this.options.put("deactivate", new JsFunction("function(ev,ui) { \n" + "wicketAjaxGet('" + this.options.put("drop", new JsFunction("function(ev,ui) { \n" + "wicketAjaxGet('" + this.options.put("activate", new JsFunction("function(ev,ui) { \n" + "wicketAjaxGet('" + builder.append(this.options.toString(this.rawOptions)); builder.append("}"); builder.append(");");
public void append(final Object object) { if (object instanceof JsMap) { ((JsMap) object).toString(this.buffer, null); } else if (object instanceof Boolean) { this.buffer.append(((Boolean) object).toString()); } else if (object instanceof JsFunction) { ((JsFunction) object).toString(this.buffer); } else if (object instanceof String[]) { this.buffer.append("["); boolean first = true; for (String s : (String[]) object) { if (!first) { this.buffer.append(","); } this.buffer.append("'"); this.buffer.append(s); this.buffer.append("'"); first = false; } this.buffer.append("]"); } else { this.buffer.append(object.toString()); } }
public void connectWith(final Sortable<?> other) { Component otherSortable = other.get(Sortable.SORTABLE_COMPONENT_ID); if (other == null) throw new WicketRuntimeException("The provides Sortable has no sortable child with id '" + Sortable.SORTABLE_COMPONENT_ID + "'"); options.put(CONNECT_WITH_OPTION, "#" + otherSortable.getMarkupId()); }
this.options.put(EventType.DRAG_END.getEventName(), new JsFunction("function() { wicketAjaxGet('" + "); }")); } else { this.options.remove(EventType.DRAG_END.getEventName()); this.options.put(EventType.DRAG.getEventName(), new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "); }")); } else { this.options.remove(EventType.DRAG.getEventName()); this.options.put(EventType.DRAG_START.getEventName(), new JsFunction("function() { wicketAjaxGet('" + this.getCallbackUrl() + "); }")); } else { this.options.remove(EventType.DRAG_START.getEventName()); builder.append(this.options.toString(this.rawOptions)); builder.append("}"); builder.append(");");
@Override protected JsBuilder getJsBuilder() { options.put(EventType.STOP.eventName, new JsFunction( "function(ev,ui) {" + options.put(EventType.RECEIVE.eventName, new JsFunction( "function(ev,ui) {" + options.put(EventType.REMOVE.eventName, new JsFunction( "function(ev,ui) {" + builder.append(options.toString(rawOptions)); builder.append("}"); builder.append(");");
@Override protected JsBuilder getJsBuilder() { JsBuilder builder = new JsBuilder(); /* Normal processing */ builder.append("jQuery('#" + getComponent().getMarkupId() + "').bgiframe("); builder.append("{"); builder.append(options.toString(rawOptions)); builder.append("}"); builder.append(")"); return builder; }
@Override protected JsBuilder getJsBuilder() { if (onBeforeShowNotificationWanted) options.put(EventType.BEFORE_SHOW.eventName, new JsFunction("function(dateText,inst) { wicketAjaxGet('" + this.getCallbackUrl() + ");}")); else options.remove(EventType.BEFORE_SHOW.getEventName()); options.put(EventType.ON_SELECT.eventName, new JsFunction("function(dateText,inst) { wicketAjaxGet('" + this.getCallbackUrl() + ");}")); else options.remove(EventType.ON_SELECT.getEventName()); options.put(EventType.ON_CLOSE.eventName, new JsFunction("function(dateText,inst) { wicketAjaxGet('" + this.getCallbackUrl() + ");}")); else options.remove(EventType.ON_CLOSE.getEventName()); options.put(EventType.ON_CHANGE_MONTH_YEAR.eventName, new JsFunction("function(year,month,inst) { wicketAjaxGet('" + this.getCallbackUrl() +
@Override protected JsBuilder getJsBuilder() { JsBuilder builder = new JsBuilder(); /* Normal processing */ builder.append("jQuery('#" + getComponent().getMarkupId() + "').bgiframe("); builder.append("{"); builder.append(options.toString(rawOptions)); builder.append("}"); builder.append(")"); return builder; }