/** * Override this for methods which invoke a cancel action. * * @param e takes a com.google.gwt.user.client.Element. * */ @Deprecated public void cancel(com.google.gwt.user.client.Element e) { setElement(e); }
/** * Override this for methods which invoke a cancel action. * * @param e takes a com.google.gwt.dom.client.Element. * */ public void cancel(com.google.gwt.dom.client.Element e) { setElement(e); // This has to be the order of calls cancel(e.<com.google.gwt.user.client.Element> cast()); }
/** * Override this for GQuery methods which take a callback and do not expect a * return value. * * @param e takes a com.google.gwt.dom.client.Element */ public void f(com.google.gwt.dom.client.Element e) { setElement(e); // This has to be the order of calls f(e.<com.google.gwt.user.client.Element> cast()); }
@Deprecated public void f(com.google.gwt.user.client.Element e) { setElement(e); Widget w = e != null ? GQuery.getAssociatedWidget(e) : null; if (w != null) { loop = true; f(w); } else { f(); } }
/** * Override this for GQuery methods which loop over matched elements and * invoke a callback on each element. * * @param e takes a com.google.gwt.dom.client.Element. * */ public Object f(com.google.gwt.dom.client.Element e, int i) { setElement(e); setIndex(i); // This has to be the order of calls return f(e.<com.google.gwt.user.client.Element> cast(), i); }
/** * Override this for GQuery methods which loop over matched widgets and * invoke a callback on each widget. * * NOTE: If your query has non-widget elements you might need to override * 'public void f()' or 'public void f(Element e)' to handle these elements and * avoid a runtime exception. */ public Object f(Widget w, int i) { setElement(w.getElement()); setIndex(i); f(w); return null; }
public void f() { try { // We clean up the returned string to smoothly append it to our document // Note: using '\s\S' instead of '.' because gwt String emulation does // not support java embedded flag expressions (?s) and javascript does // not have multidot flag. String s = arguments(0).toString().replaceAll("<![^>]+>\\s*", "") .replaceAll("</?html[\\s\\S]*?>\\s*", "") .replaceAll("<head[\\s\\S]*?</head>\\s*", "") .replaceAll("<script[\\s\\S]*?</script>\\s*", "") .replaceAll("</?body[\\s\\S]*?>\\s*", ""); // We wrap the results in a div s = "<div>" + s + "</div>"; Ajax.this.empty().append(filter.isEmpty() ? $(s) : $(s).find(filter)); if (onSuccess != null) { onSuccess.setElement(Ajax.this.get(0)); onSuccess.f(); } } catch (Exception e) { if (GWT.getUncaughtExceptionHandler() != null) { GWT.getUncaughtExceptionHandler().onUncaughtException(e); } } } });
/** * Override this for GQuery methods which loop over matched elements and * invoke a callback on each element. * * @param e takes a com.google.gwt.user.client.Element. * */ @Deprecated public Object f(com.google.gwt.user.client.Element e, int i) { setElement(e); setIndex(i); Widget w = GQuery.getAssociatedWidget(e); if (w != null) { f(w, i); } else { f(e.<com.google.gwt.dom.client.Element> cast()); } return null; }
/** * Override this for GQuery methods which take a callback, but do not expect a * return value, apply to a single widget. * * NOTE: If your query has non-widget elements you might need to override * 'public void f()' or 'public void f(Element e)' to handle these elements and * avoid a runtime exception. */ public void f(Widget w) { setElement(w.getElement()); if (loop) { loop = false; f(); } else { f(w.getElement().<com.google.gwt.dom.client.Element> cast()); } }
onSuccess.setElement(settings.getContext()); onError.setElement(settings.getContext());
/** * Override this method for bound callbacks. */ public void f(int i, Object... args) { setIndex(i); setArguments(args); if (args.length == 1 && args[0] instanceof JavaScriptObject) { if (JsUtils.isElement((JavaScriptObject) args[0])) { setElement((com.google.gwt.dom.client.Element) args[0]); f(getElement(), i); } else if (JsUtils.isEvent((JavaScriptObject) args[0])) { setEvent((Event) args[0]); f(getEvent()); } else { f(); } } }