List of usage examples for com.google.gwt.core.client JavaScriptObject createObject
public static native JavaScriptObject createObject() ;
From source file:org.gwtnode.modules.nodemailer.StubOptions.java
License:Apache License
public final static StubOptions create() { return JavaScriptObject.createObject().<StubOptions>cast(); }
From source file:org.gwtnode.modules.xml2js.ParseOptions.java
License:Apache License
public static final ParseOptions create() { return JavaScriptObject.createObject().cast(); }
From source file:org.gwtnode.modules.xmlCrypto.SignedXmlOptions.java
License:Apache License
public static final SignedXmlOptions create() { return JavaScriptObject.createObject().cast(); }
From source file:org.gwtnode.modules.xmldom.ParserOptions.java
License:Apache License
public static final ParserOptions create() { return JavaScriptObject.createObject().cast(); }
From source file:org.gwtnode.modules.xmldom.w3c.DOMException.java
License:Apache License
@SuppressWarnings("deprecation") public static final DOMException create(JavaScriptException exception) { DOMException result;/*from w ww. ja v a2s. c om*/ if (exception != null) { JavaScriptObject e = exception.getException(); if (e != null) { result = e.cast(); String m = result.message(); if (m == null || m.isEmpty()) result.message(exception.getMessage()); } else { result = JavaScriptObject.createObject().cast(); result.message(exception.getMessage()); } } else result = JavaScriptObject.createObject().cast(); return result; }
From source file:org.jboss.hal.js.JsonObject.java
License:Apache License
public static JsonObject create() { return JavaScriptObject.createObject().cast(); }
From source file:org.kjots.json.object.gwt.client.impl.GwtJsonObjectFactoryImplBase.java
License:Apache License
/** * Create a new JSON object./*w w w. j a v a 2 s . com*/ * * @param <T> The type of the JSON object. * @param jsonObjectClass The class of the JSON object. * @return The JSON object. */ @Override public final <T extends JsonObject> T createJsonObject(Class<T> jsonObjectClass) { return this.getJsonObjectInstantiator(jsonObjectClass).newInstance(JavaScriptObject.createObject()); }
From source file:org.kjots.json.object.gwt.client.impl.GwtJsonObjectFactoryImplBase.java
License:Apache License
/** * Create a new JSON object.//from w w w.j ava 2s .c o m * * @param <T> The type of the JSON object. * @param jsonObjectClassName The name of the class of the JSON object. * @return The JSON object. */ @Override public final <T extends JsonObject> T createJsonObject(String jsonObjectClassName) { return this.<T>getJsonObjectInstantiator(jsonObjectClassName).newInstance(JavaScriptObject.createObject()); }
From source file:org.lirazs.gbackbone.client.core.js.JsObject.java
License:Apache License
public static JsObject create() { return JavaScriptObject.createObject().cast(); }
From source file:org.nsesa.editor.gwt.editor.client.Editor.java
License:EUPL
/** * Configures the local/*from w w w . ja v a2 s . c o m*/ */ protected void configure() { try { RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET, CONFIGURATION_FILE); requestBuilder.sendRequest("", new RequestCallback() { @Override public void onResponseReceived(Request req, Response resp) { final JavaScriptObject configuration; try { configuration = JsonUtils.safeEval(resp.getText()); clientFactory.setConfiguration(configuration); // configuration ok -- continue LOG.log(Level.INFO, "Successfully read " + CONFIGURATION_FILE); } catch (Exception e) { LOG.log(Level.WARNING, "Could parse " + CONFIGURATION_FILE + ", configuration will be empty.", e); } finally { // continue with the loading onModuleLoadDeferred(); } } @Override public void onError(Request res, Throwable throwable) { // handle errors LOG.log(Level.INFO, "Could not read " + CONFIGURATION_FILE + ", configuration will be empty.", throwable); clientFactory.setConfiguration(JavaScriptObject.createObject()); // configuration failed -- ignore onModuleLoadDeferred(); } }); } catch (RequestException e) { LOG.log(Level.SEVERE, "Could not execute GET request to retrieve " + CONFIGURATION_FILE, e); clientFactory.setConfiguration(JavaScriptObject.createObject()); // configuration failed -- ignore onModuleLoadDeferred(); } }