List of usage examples for org.apache.wicket.core.request.handler IPartialPageRequestHandler prependJavaScript
void prependJavaScript(CharSequence javascript);
From source file:com.googlecode.wicket.jquery.ui.JQueryUIBehavior.java
License:Apache License
@Override public void destroy(IPartialPageRequestHandler handler) { String statement = String.format("var $w = %s; if($w) { $w.destroy(); }", this.widget()); handler.prependJavaScript(JQueryUtils.trycatch(statement)); this.onDestroy(handler); }
From source file:com.googlecode.wicket.kendo.ui.KendoUIBehavior.java
License:Apache License
@Override public void destroy(IPartialPageRequestHandler handler) { handler.prependJavaScript(String.format("var $w = %s; if($w) { $w.destroy(); }", this.widget())); this.onDestroy(handler); }
From source file:com.googlecode.wicket.kendo.ui.widget.window.WindowBehavior.java
License:Apache License
/** * Closes the window in ajax.<br/> * * @param handler the {@link IPartialPageRequestHandler} *//* w w w . j a v a 2 s . c o m*/ public void close(IPartialPageRequestHandler handler) { handler.prependJavaScript(this.widget() + ".close();"); }
From source file:org.efaps.ui.wicket.behaviors.AjaxDownloadBehavior.java
License:Apache License
/** * Call this method to initiate the download. * @param _target Ajaxtarget// w ww . jav a 2 s . c o m */ public void initiate(final IPartialPageRequestHandler _target) { final String url = getCallBackURL(); if (url != null) { _target.prependJavaScript(getCallBackScript(url)); } }
From source file:org.efaps.ui.wicket.components.modalwindow.ModalWindowContainer.java
License:Apache License
/** * @param _target AjaxRequestTarget//from ww w. j a v a2s . co m * @param _uiObject uiObject of the page that was opened in the current modal */ private void closeInternal(final IPartialPageRequestHandler _target, final ICmdUIObject _uiObject) { if (this.targetShowFile) { ((AbstractMergePage) getPage()).getDownloadBehavior().initiate(_target); } if (this.reloadChild) { _target.prependJavaScript(getReloadJavaScript(_uiObject)); } }