From 48e377fad3d655638e2e3d7192bba43abc214981 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Thu, 29 Jan 2015 11:17:44 +0100 Subject: [PATCH] Handle JsonBuilder wrappers in $ method --- .../src/main/java/com/google/gwt/query/client/GQuery.java | 4 ++++ .../gwt/query/client/plugins/events/EventsListener.java | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index 418bfdb0..ba59cadd 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -33,6 +33,7 @@ import com.google.gwt.dom.client.OptionElement; import com.google.gwt.dom.client.SelectElement; import com.google.gwt.dom.client.Style.Display; import com.google.gwt.dom.client.TextAreaElement; +import com.google.gwt.query.client.builders.JsonBuilder; import com.google.gwt.query.client.css.HasCssValue; import com.google.gwt.query.client.css.TakesCssValue; import com.google.gwt.query.client.css.TakesCssValue.CssSetter; @@ -285,6 +286,9 @@ public class GQuery implements Lazy { if (JsUtils.isElement(o)) { return $(JsUtils. cast(o)); } + if (o instanceof JsonBuilder) { + return new GQuery(((JsonBuilder) o).getDataImpl()); + } if (o instanceof JavaScriptObject) { return $((JavaScriptObject) o); } diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java index e48ba9bd..48285d8e 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java @@ -14,7 +14,6 @@ package com.google.gwt.query.client.plugins.events; import static com.google.gwt.query.client.GQuery.$; -import static com.google.gwt.query.client.GQuery.console; import com.google.gwt.core.client.Duration; import com.google.gwt.dom.client.Element; -- 2.39.5