Package com.google.gwt.coreext.client

Examples of com.google.gwt.coreext.client.DataBag


    if (CustomEvent.isCustomEvent(e.getType())) {
      // Render key-value pairs for the custom event.
      // Simply iterate over the custom data on the CustomEvent.
      CustomEvent customEvent = e.cast();
      DataBag customData = customEvent.getCustomData();
      customData.iterate(new IterationCallback() {
        public void onIteration(String key, String value) {
          details.put(key, new StringCellRenderer(value));
        }
      });
    }
View Full Code Here


  }

  public void testParseQueryStringBad() {
    postMessageMethod = new PostMessageCallback() {
      public void postMessage(JavaScriptObject message) {
        DataBag messageBag = message.cast();
        assertEquals("type", 103, messageBag.getIntProperty("type"));
      }
    };
    doInjectedTest(new Method() {
      public void execute() {
        nativeParseQueryString("http://foo.com?this-is-a-test",
View Full Code Here

  }

  public void testParseQueryStringGood() {
    postMessageMethod = new PostMessageCallback() {
      public void postMessage(JavaScriptObject message) {
        DataBag messageBag = message.cast();
        assertEquals("type", 103, messageBag.getIntProperty("type"));
        JavaScriptObject options = messageBag.getJSObjectProperty("options");
        assertNotNull("options", options);
        DataBag optionsBag = options.cast();
        assertEquals("reload url", "http://foo.com?foo=good",
            optionsBag.getStringProperty("reload"));
      }
    };
    doInjectedTest(new Method() {
      public void execute() {
        nativeParseQueryString("http://foo.com?foo=good&SpeedTracer=monitor",
View Full Code Here

  }
 
  public void testParseQueryStringPersistent() {
    postMessageMethod = new PostMessageCallback() {
      public void postMessage(JavaScriptObject message) {
        DataBag messageBag = message.cast();
        assertEquals("type", 103, messageBag.getIntProperty("type"));
        JavaScriptObject options = messageBag.getJSObjectProperty("options");
        assertNotNull("options", options);
        DataBag optionsBag = options.cast();
        assertEquals("reload url", "http://foo.com?foo=good&SpeedTracer=xhr(http://hiddenmonitor.com),header(header:monitor),timeout(10)&speed=ludicrous",
            optionsBag.getStringProperty("reload"));
      }
    };
    doInjectedTest(new Method() {
      public void execute() {
        nativeParseQueryString("http://foo.com?foo=good&SpeedTracer=xhr(http://hiddenmonitor.com),header(header:monitor),monitor,blah,timeout(10)&speed=ludicrous",
View Full Code Here

  }
 
  public void testParseQueryStringAfter() {
    postMessageMethod = new PostMessageCallback() {
      public void postMessage(JavaScriptObject message) {
        DataBag messageBag = message.cast();
        assertEquals("type", 103, messageBag.getIntProperty("type"));
        JavaScriptObject options = messageBag.getJSObjectProperty("options");
        assertNotNull("options", options);
        DataBag optionsBag = options.cast();
        assertEquals("reload url", "http://foo.com?foo=SpeedTracer,asdf&speed=ludicrous",
            optionsBag.getStringProperty("reload"));
      }
    };
    doInjectedTest(new Method() {
      public void execute() {
        nativeParseQueryString("http://foo.com?foo=SpeedTracer,asdf&SpeedTracer=monitor,blah&speed=ludicrous",
View Full Code Here

TOP

Related Classes of com.google.gwt.coreext.client.DataBag

Copyright © 2018 www.massapicom. 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.