/** * Gets the data-provider behavior's url * * @return the data-provider behavior's url */ protected final CharSequence getCallbackUrl() { return this.providerBehavior.getCallbackUrl(); }
/** * Gets the data-provider behavior's url * * @return the data-provider behavior's url */ protected final CharSequence getCallbackUrl() { return this.providerBehavior.getCallbackUrl(); }
/** * Gets the data-provider behavior's url * * @return the data-provider behavior's url */ protected final CharSequence getCallbackUrl() { return this.providerBehavior.getCallbackUrl(); }
/** * Gets the data-provider behavior's url * * @return the data-provider behavior's url */ protected final CharSequence getCallbackUrl() { return this.providerBehavior.getCallbackUrl(); }
public JsAjaxCallbackFunction(AbstractAjaxBehavior behavior) { super("function() { Wicket.Ajax.get('" + behavior.getCallbackUrl() + "'); }"); } }
public JsAjaxCallbackFunction(AbstractAjaxBehavior behavior) { super("function() { wicketAjaxGet('" + behavior.getCallbackUrl() + "'); }"); } }
public void executeAjaxBehavior(String path, String value) { AbstractAjaxBehavior behavior = (AbstractAjaxBehavior) getComponentFromLastRenderedPage(path).getBehaviors().get(0); CharSequence url = behavior.getCallbackUrl(false); WebRequestCycle cycle = setupRequestAndResponse(true); getServletRequest().setRequestToRedirectString(url.toString()); String[] ids = path.split(":"); String id = ids[ids.length-1]; getServletRequest().setParameter(id, value); processRequestCycle(cycle); }
@Override protected JSONObject getProperties() throws JSONException { JSONObject properties = super.getProperties(); properties.put("dataUrl", behavior.getCallbackUrl()); return properties; }
@Override public void onComponentTag(ComponentTag tag) { // add onclick handler to the browser // if clicked in the browser, the function // click.response(AjaxRequestTarget target) is called on the server side tag.put("ondblclick", "Wicket.Ajax.get({'u':'" + click.getCallbackUrl() + "'})"); tag.put("onclick", "Wicket.Ajax.get({'u':'" + click.getCallbackUrl() + "'})"); } }
@Override public void addConfiguration(final ObjectNode editorConfig) throws IOException { Json.appendToCommaSeparatedString(editorConfig, CKEditorConfig.EXTRA_PLUGINS, HippoAutoSave.PLUGIN_NAME); editorConfig.put(HippoAutoSave.CONFIG_CALLBACK_URL, autoSaveBehavior.getCallbackUrl().toString()); }
@Override public void onComponentTag(ComponentTag tag) { // add onclick handler to the browser // if clicked in the browser, the function // click.response(AjaxRequestTarget target) is called on the server side tag.put("ondblclick", "wicketAjaxGet('" + click.getCallbackUrl() + "')"); tag.put("onclick", "wicketAjaxGet('" + click.getCallbackUrl() + "')"); }
@Override public void onComponentTag(ComponentTag tag) { // add onclick handler to the browser // if clicked in the browser, the function // click.response(AjaxRequestTarget target) is called on the server side tag.put("ondblclick", "Wicket.Ajax.get({'u':'" + click.getCallbackUrl() + "'})"); tag.put("onclick", "Wicket.Ajax.get({'u':'" + click.getCallbackUrl() + "'})"); } }
@Override public void onClick(AjaxRequestTarget aTarget) { String url = downloadBehavior.getCallbackUrl().toString(); if (addAntiCache) { url = url + (url.contains("?") ? "&" : "?"); url = url + "antiCache=" + System.currentTimeMillis(); } // the timeout is needed to let Wicket release the channel aTarget.appendJavaScript("setTimeout(\"window.location.href='" + url + "'\", 100);"); }
@Override protected JSONObject getProperties() throws JSONException { StringBuilder proxySb = new StringBuilder(); proxySb.append("new Ext.data.HttpProxy({"); proxySb.append("url: '"); proxySb.append(behavior.getCallbackUrl()); proxySb.append("', headers: { 'Wicket-Ajax': true, 'Wicket-Ajax-BaseURL': Wicket.Ajax.baseUrl || '.' }})"); JSONObject properties = super.getProperties(); properties.put("proxy", new JSONIdentifier(proxySb.toString())); properties.put("root", JSON_PROP_RECORDS); properties.put("totalProperty", JSON_PROP_TOTAL); return properties; }
/** * * @param link * @return Url */ public Url urlFor(final AjaxLink<?> link) { AbstractAjaxBehavior behavior = WicketTesterHelper.findAjaxEventBehavior(link, "click"); Url url = Url.parse(behavior.getCallbackUrl().toString(), Charset.forName(request.getCharacterEncoding())); return transform(url); }
/** * * @param link * @return Url */ public Url urlFor(final AjaxLink<?> link) { AbstractAjaxBehavior behavior = WicketTesterHelper.findAjaxEventBehavior(link, "click"); Url url = Url.parse(behavior.getCallbackUrl().toString(), Charset.forName(request.getCharacterEncoding())); return transform(url); }
@Override public String getJSadd(IOpenLayersMap map) { // the proxy only has the url after it is added to the containing page so we have to declare // it here not in the constructor. parameters.put("wfsUrl", JSUtils.getQuotedString(wfsProxy.getProxyUrl() + wfsURL)); parameters.put("featureSelectedCallback", JSUtils.getQuotedString(featureSelectionBehaviour.getCallbackUrl() + "&propertyValue=")); return super.getJSadd(map, "OpenLayers.Control.GetSpecificFeature", parameters) + "\n" + super.getJSinvoke(map, "activate()"); }
@Override public String getJSadd(IOpenLayersMap map) { // the proxy only has the url after it is added to the containing page so we have to declare it here not in the constructor. parameters.put("wfsUrl", JSUtils.getQuotedString(wfsProxy.getProxyUrl(true) + wfsURL)); parameters.put("featureSelectedCallback", JSUtils.getQuotedString(this.featureSelectionBehaviour.getCallbackUrl(true) + "&propertyValue=")); return super.getJSadd(map, "OpenLayers.Control.GetSpecificFeature", this.parameters) + "\n" + super.getJSinvoke(map, "activate()"); }
/** * Builds and processes a request suitable for executing an <code>AbstractAjaxBehavior</code>. * * @param behavior * an <code>AbstractAjaxBehavior</code> to execute */ public void executeBehavior(final AbstractAjaxBehavior behavior) { CharSequence url = behavior.getCallbackUrl(false); WebRequestCycle cycle = setupRequestAndResponse(true); getServletRequest().setRequestToRedirectString(url.toString()); processRequestCycle(cycle); }
@Override protected void onRenderProperties(org.json.JSONObject properties) throws JSONException { super.onRenderProperties(properties); RequestCycle rc = RequestCycle.get(); properties.put("store", new JSONIdentifier(store.getJsObjectId())); properties.put("codecUrl", codecBehavior.getCallbackUrl()); properties.put("imageService", imageService.getCallbackUrl()); properties.put("emptyImg", rc.urlFor(new ResourceReferenceRequestHandler(EMPTY_PNG))); properties.put("folderImg", rc.urlFor(new ResourceReferenceRequestHandler(FOLDER_PNG))); properties.put("documentImg", rc.urlFor(new ResourceReferenceRequestHandler(DOCUMENT_PNG))); }