Package com.google.gxp.html

Examples of com.google.gxp.html.HtmlClosure


/**
* Tests for {@code RssAppender}
*/
public class RssAppenderTest extends BaseFunctionalTestCase {
  public void testAppendHtmlClosure() throws Exception {
    HtmlClosure closure = HtmlClosures.fromHtml("foo > bar < baz & buz ' qux \" quux");
    RssAppender.INSTANCE.append(out, gxpContext, closure);
    assertOutputEquals("foo &gt; bar &lt; baz &amp; buz &apos; qux &quot; quux");

    try {
      RssAppender.INSTANCE.append(out, gxpContext, (HtmlClosure)null);
View Full Code Here


    resp.setCharacterEncoding("UTF-8");
    pageSkinWriter.write("Walkaround Import", participantId.getAddress(),
        ImportOverviewFragment.getGxpClosure(
            participantId.getAddress(),
            xsrfHelper.createToken(XSRF_ACTION),
            new HtmlClosure() {
              @Override public void write(Appendable out, GxpContext context) throws IOException {
                out.append(instanceSelectionHtml);
              }
            },
            tasksInProgress,
View Full Code Here

      writeStaticClientResponse(req, resp, wave);
    }
  }

  private HtmlClosure inlineNocacheJs() {
    return new HtmlClosure() {
      @Override public void write(Appendable out, GxpContext gxpContext) throws IOException {
        out.append("<script type='text/javascript'>\n");
        // No need to escape this, GWT's nocache javascript is already escaped for
        // the purpose of direct inclusion into script elements.
        out.append(nocacheJs);
View Full Code Here

  }

  private HtmlClosure announcementHtml() {
    return announcementHtml.isEmpty()
        ? null
        : new HtmlClosure() {
          @Override public void write(Appendable out, GxpContext context) throws IOException {
            out.append(announcementHtml);
          }
        };
  }
View Full Code Here

  }

  private HtmlClosure announcementHtml() {
    return announcementHtml.isEmpty()
        ? null
        : new HtmlClosure() {
          @Override public void write(Appendable out, GxpContext context) throws IOException {
            out.append(announcementHtml);
          }
        };
  }
View Full Code Here

      } catch (RetryableFailure e) {
        throw new IOException(e);
      }
    }

    HtmlClosure content = StoreViewFragment.getGxpClosure(
        storeType, id, objectVersion == null ? "" : ("" + objectVersion),
        historyStart, historyEnd, items, snapshotVersion, snapshot);
    resp.setContentType("text/html");
    Admin.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, content);
View Full Code Here

            throw new NullPointerException("The GXP " + getGxpName()
                    + " could not be loaded.  This is probably because you have"
                    + " a typo in your config.");
        }
        container.inject(gxp);
        return new HtmlClosure() {
            public void write(Appendable out, GxpContext gxpContext) throws IOException {
                gxp.write(out, gxpContext);
            }
        };
    }
View Full Code Here

TOP

Related Classes of com.google.gxp.html.HtmlClosure

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.