Examples of toSafeHtml()


Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

        final SafeHtmlBuilder sb = new SafeHtmlBuilder();
        sb.appendEscaped(" | ");
        sb.appendEscaped(application.getI18n().user_status());
        sb.append(' ');
        sb.appendEscaped(application.getCurrentUsername());
        currentUserInfo.setInnerSafeHtml(sb.toSafeHtml());
    }


    @Override
    public void onLogoutEvent(final LogoutEvent logoutEvent) {
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

                    final Object userData = error.getUserData();
                    b.appendEscaped(error.getPath()).appendEscaped(": ");
                }
                b.appendEscaped(error.getMessage()).appendEscaped("\n");
            }
            Window.alert(b.toSafeHtml().asString());
        }
    }

    @UiHandler("saveButton")
    public void onSaveButtonClick(final ClickEvent event) {
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    for (String error : errors) {
      sb.appendEscaped(error);
      sb.appendHtmlConstant("<br />");
    }
    errorsPanel.add(new Alert(sb.toSafeHtml().asString(), AlertType.ERROR));
  }
 
  @UiHandler("cancelButton")
  void onCancelClick(ClickEvent event) {
    delegate.onCancelClick();
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

            builder.appendHtmlConstant("</small>");
        }

        builder.appendHtmlConstant("</h1>");

        getElement().setInnerSafeHtml(builder.toSafeHtml());
    }
}
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

    Cell<T> cell = createCell();
    T value = createCellValue();
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, null);
    cell.render(context, value, sb);
    assertEquals(getExpectedInnerHtml(), sb.toSafeHtml().asString());
  }

  /**
   * Test rendering the cell with a negative index is handled.
   */
 
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

    Cell<T> cell = createCell();
    T value = createCellValue();
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(-1, -1, null);
    cell.render(context, value, sb);
    assertEquals(getExpectedInnerHtml(), sb.toSafeHtml().asString());
  }

  /**
   * Test rendering the cell with a null value and no view data.
   */
 
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

  public void testRenderNull() {
    Cell<T> cell = createCell();
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, null);
    cell.render(context, null, sb);
    assertEquals(getExpectedInnerHtmlNull(), sb.toSafeHtml().asString());
  }

  /**
   * Create a new cell to test.
   *
 
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

    cell.setViewData(DEFAULT_KEY, createCellViewData());
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, DEFAULT_KEY);
    cell.render(context, value, sb);
    String expectedInnerHtmlViewData = getExpectedInnerHtmlViewData();
    String asString = sb.toSafeHtml().asString();
    assertEquals(expectedInnerHtmlViewData, asString);
  }

  @Override
  protected abstract AbstractEditableCell<T, V> createCell();
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

    cell.setViewData(DEFAULT_KEY, createCellViewData());
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, DEFAULT_KEY);
    cell.render(context, value, sb);
    String expectedInnerHtmlViewData = getExpectedInnerHtmlViewDisabled();
    String asString = sb.toSafeHtml().asString();
    assertEquals(expectedInnerHtmlViewData, asString);
  }

  // Added for CedarCommon
  public void testRenderViewDataDisabledUnchecked() {
View Full Code Here

Examples of com.google.gwt.safehtml.shared.SafeHtmlBuilder.toSafeHtml()

    cell.setViewData(DEFAULT_KEY, createCellViewData());
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, DEFAULT_KEY);
    cell.render(context, value, sb);
    String expectedInnerHtmlViewData = getExpectedInnerHtmlViewDisabled();
    String asString = sb.toSafeHtml().asString();
    assertEquals(expectedInnerHtmlViewData, asString);
  }

  @Override
  protected CheckboxCell createCell() {
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.