Package org.waveprotocol.wave.client.common.safehtml

Examples of org.waveprotocol.wave.client.common.safehtml.SafeHtmlBuilder.toSafeHtml()


   */
  private void setMenuState(Set<MenuOption> options, Set<MenuOption> selected) {
    UiBuilder builder = BlipMetaViewBuilder.menuBuilder(options, selected, css);
    SafeHtmlBuilder  out = new SafeHtmlBuilder();
    builder.outputHtml(out);
    getMenu().setInnerHTML(out.toSafeHtml().asString());
  }

  public void clearContent() {
    getInlineLocators().clear();
    getContentContainer().getFirstChildElement().setInnerHTML("");
View Full Code Here


   */
  private void setMenuState(Set<MenuOption> options, Set<MenuOption> selected) {
    UiBuilder builder = BlipMetaViewBuilder.menuBuilder(options, selected, css);
    SafeHtmlBuilder  out = new SafeHtmlBuilder();
    builder.outputHtml(out);
    getMenu().setInnerHTML(out.toSafeHtml().asString());
  }

  public void clearContent() {
    getInlineLocators().clear();
    getContentContainer().getFirstChildElement().setInnerHTML("");
View Full Code Here

  public void setAvatars(Iterable<Profile> profiles) {
    SafeHtmlBuilder html = new SafeHtmlBuilder();
    for (Profile profile : profiles) {
      renderAvatar(html, profile);
    }
    avatars.setInnerHTML(html.toSafeHtml().asString());
  }

  @Override
  public void setTitleText(String title) {
    this.title.setInnerText(title);
View Full Code Here

    html.appendHtmlConstant("<span class='" + css.unreadCount() + "'>");
    html.appendHtmlConstant(String.valueOf(unread));
    html.appendHtmlConstant("</span>");
    html.appendHtmlConstant(" of ");
    html.appendHtmlConstant(String.valueOf(total));
    return html.toSafeHtml();
  }

  private SafeHtml renderReadMessages(int total) {
    SafeHtmlBuilder html = new SafeHtmlBuilder();
    html.appendHtmlConstant(String.valueOf(total));
View Full Code Here

  private SafeHtml renderReadMessages(int total) {
    SafeHtmlBuilder html = new SafeHtmlBuilder();
    html.appendHtmlConstant(String.valueOf(total));
    html.appendHtmlConstant(" msgs");
    return html.toSafeHtml();
  }

  private void renderAvatar(SafeHtmlBuilder html, Profile profile) {
    // URL is trusted to be attribute safe (i.e., no ' or ")
    String url = profile.getImageUrl();
View Full Code Here

          timeHtml.appendEscaped("" + value);
          timeHtml.appendHtmlConstant("</td></tr>");
        }
      });
      timeHtml.appendHtmlConstant("</table>");
      timeBox.setInnerHTML(timeHtml.toSafeHtml().asString());

    }
  }
}
View Full Code Here

  public SafeHtml getResult() {
    SafeHtmlBuilder builder = new SafeHtmlBuilder();
    for (ResultProducingRenderHelper<? extends UiBuilder> h : helpers) {
      h.getResult().outputHtml(builder);
    }
    return builder.toSafeHtml();
  }

  @Override
  public void end() {
    for (ResultProducingRenderHelper<?> h : helpers) {
View Full Code Here

        SafeHtmlBuilder builder = new SafeHtmlBuilder();
        builder.append(START_SUGGEST_LINK);
        builder.append(title);
        builder.append(END_SUGGEST_LINK);

        return menu.addItem(builder.toSafeHtml(), callback);
      }

      @Override
      public MenuItem addItem(String title, Command callback) {
        return addItem(EscapeUtils.fromString(title), callback);
View Full Code Here

      return null;
    }
    SafeHtmlBuilder html = new SafeHtmlBuilder();
    ui.outputHtml(html);
    Element div = com.google.gwt.dom.client.Document.get().createDivElement();
    div.setInnerHTML(html.toSafeHtml().asString());
    Element ret = div.getFirstChildElement();
    // Detach, in order that this element looks free-floating (required by some
    // preconditions).
    ret.removeFromParent();
    return ret;
View Full Code Here

            if (error != null) {
              stack.appendHtmlConstant("Caused by: ");
            }
          }

          whenReady.use(stack.toSafeHtml());
        }
      }.schedule(1);
    }

    private static String maybe(String value, String otherwise) {
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.