Package com.google.gwt.json.client

Examples of com.google.gwt.json.client.JSONString.stringValue()


            JSONString resultString = (JSONString) resultArray.get(0);

            StringBuffer newText = new StringBuffer(textAreaHistory.getText());
            newText.append(queueName);
            newText.append(':');
            newText.append(resultString.stringValue());
            newText.append('\n');
            textAreaHistory.setText(newText.toString());
            textAreaHistory.setCursorPos(textAreaHistory.getVisibleLines());
        }
    }
View Full Code Here


    JSONValue value = get(index);
    if (value == null) {
      return null;
    }
    JSONString str = value.isString();
    return str == null ? null : str.stringValue();
  }

  protected JSONNumber getNumber(int index) {
    JSONValue val = get(index);
    if (val == null) {
View Full Code Here

    JSONValue value = get(key);
    if (value == null) {
      return null;
    }
    JSONString str = value.isString();
    return str == null ? null : str.stringValue();
  }

  protected JSONNumber getNumber(String key) {
    JSONValue val = get(key);
    if (val == null) {
View Full Code Here

   private String getErrorMessage(ServerError error)
   {
      String message = error.getUserMessage();
      JSONString userMessage = error.getClientInfo().isString();
      if (userMessage != null)
         message = userMessage.stringValue();
      return message;
   }
  
   private final Display view_ ;
   private final PresentationServerOperations server_;
View Full Code Here

                  JSONValue errValue = error.getClientInfo();
                  if (errValue != null)
                  {
                     JSONString errMsg = errValue.isString();
                     if (errMsg != null)
                        message = errMsg.stringValue();
                  }
                 
                  globalDisplay_.showMessage(GlobalDisplay.MSG_ERROR,
                                             "Error while opening file",
                                             message);
View Full Code Here

         JSONString string = array.get(0).isString();
         if (string == null)
            break;

         values.add(string.stringValue());
      }
      return values;
   }
  
   private native final JavaScriptObject getOptionTypeNative(String name) /*-{
 
View Full Code Here

      return true;
    }
    else if (v1.isString() != null) {
      JSONString s1 = v1.isString();
      JSONString s2 = v2.isString();
      return s1.stringValue().equals(s2.stringValue());
    }
    else {
      throw new AssertionError("Found unexpected subtype of JSONValue: " + v1.getClass());
    }
    // NOTREACHED
View Full Code Here

                Log.debug("Failed to strip out HTML.  This should be preferred?");
            }
            try {
                JSONObject response = JSONParser.parseLenient(json).isObject();
                JSONString outcome = response.get("outcome").isString();
                if (outcome != null && "success".equalsIgnoreCase(outcome.stringValue())) {
                    patchManager.getPatches(new SimpleCallback<Patches>() {
                        @Override
                        public void onSuccess(final Patches result) {
                            context.patchInfo = result.getLatest();
                            wizard.next();
View Full Code Here

            // Read boolean telling if marker has a info window
            if ((value = jsMarker.get("info")) != null) {
              if ((jsHasInfo = value.isBoolean()) != null
                  && jsHasInfo.booleanValue()) {
                marker.addMarkerClickHandler(new InfoWindowOpener(
                    jsMID.stringValue()));

              }
            }

            knownMarkers.put(jsMID.toString(), marker);
View Full Code Here

   */
  private static String getJsonStringValue(JSONObject json, String key) {
    JSONValue value = json.get(key);
    JSONString string = (value == null) ? null : value.isString();
    if (string != null) {
      return string.stringValue();
    } else {
      return null;
    }
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.