Package com.google.gwt.safehtml.shared

Examples of com.google.gwt.safehtml.shared.SafeHtml


      SafeHtmlBuilder sb) {
    if (value == null) {
      return;
    }

    SafeHtml name;
    if (value.getName() == null) {
      name = SafeHtmlUtils.fromSafeConstant("<i>Unnamed</i>");
    } else {
      name = SafeHtmlUtils.fromString(value.getName());
    }
View Full Code Here


    String userAgent = getThreadLocalRequest().getHeader("User-Agent");

    // Escape data from the client to avoid cross-site script vulnerabilities.
    SafeHtmlBuilder builder = new SafeHtmlBuilder();

    SafeHtml safeHtml = builder//
    .appendEscapedLines("Hello, " + person.getName() + "!")//
    .appendHtmlConstant("<br>")//
    .appendEscaped("I am running " + serverInfo + ".")//
    .appendHtmlConstant("<br><br>")//
    .appendEscaped("It looks like you are using: ")//
View Full Code Here

    @Override
    public void render(Context context, T value, SafeHtmlBuilder sb) {


        String css = !visible ? "textlink-cell rbac-suppressed" : "textlink-cell";
        SafeHtml html = new SafeHtmlBuilder()
                .appendHtmlConstant("<a href='javascript:void(0)' tabindex=\"-1\" class='"+css+"'>")
                .appendHtmlConstant(title)
                .appendHtmlConstant("</a>")
                .toSafeHtml();
View Full Code Here

        sb.appendHtmlConstant("<div>");

        // current user
        String userHtml = "<i style='color:#cecece' class='icon-user'></i>&nbsp;"+bootstrap.getPrincipal();

        SafeHtml principal = new SafeHtmlBuilder().appendHtmlConstant("<div class='header-textlink'>"+userHtml+"</div>").toSafeHtml();
        final HTML userButton = new HTML(principal);
        userButton.getElement().setAttribute("style", "cursor:pointer");
        tools.add(userButton);

        final DefaultPopup menuPopup = new DefaultPopup(DefaultPopup.Arrow.TOP);
View Full Code Here

        this.title = title;
    }

    @Override
    public void render(Context context, T value, SafeHtmlBuilder sb) {
        SafeHtml html = new SafeHtmlBuilder()
                .appendHtmlConstant("<a href='javascript:void(0)' tabindex=\"-1\">")
                .appendHtmlConstant(title)
                .appendHtmlConstant("</a>")
                .toSafeHtml();
View Full Code Here

        this.command = command;
    }

    @Override
    public void render(Context context, DeploymentRecord record, SafeHtmlBuilder sb) {
        SafeHtml html = new SafeHtmlBuilder().appendHtmlConstant("<button class='celltable-button' type=\"button\" tabindex=\"-1\">")
                                             .appendHtmlConstant(this.command.getLabel(record))
                                             .appendHtmlConstant("</button>")
                                             .toSafeHtml();
       
        sb.append(html);
View Full Code Here

    @Override
    public void render(Context context, String value, SafeHtmlBuilder sb) {

        expr = Expression.fromString(value);
        SafeHtml html = new SafeHtmlBuilder()
                .appendHtmlConstant( "<div tabindex=\"-1\" class='expression-cell'>"+expr.toString()+"</div>").toSafeHtml();

        sb.append(html);

    }
View Full Code Here

        sb.appendHtmlConstant("<div>");

        // current user
        String userHtml = "<i style='color:#cecece' class='icon-user'></i>&nbsp;"+bootstrap.getPrincipal();

        SafeHtml principal = new SafeHtmlBuilder().appendHtmlConstant("<div class='header-textlink'>"+userHtml+"</div>").toSafeHtml();
        final HTML userButton = new HTML(principal);
        userButton.getElement().setAttribute("style", "cursor:pointer");
        tools.add(userButton);

        final DefaultPopup menuPopup = new DefaultPopup(DefaultPopup.Arrow.TOP);
View Full Code Here

     * @return the header as a string
     */
    public static SafeHtml getHeader(final Image image, final String text) {

        return HEADER_TEMPLATE.message(
                new SafeHtml() {
                   public String asString() {
                       return image.toString();
                   }
                },
                new SafeHtml() {
                    public String asString() {
                        return text;
                    }
                });
    }
View Full Code Here

    private SafeHtml                 shtml;

    public RuleEnabledStateCell() {
        //Do the expensive operations in the constructor
        AbstractImagePrototype aip = AbstractImagePrototype.create( images.warning() );
        SafeHtml icon = SafeHtmlUtils.fromTrustedString( aip.getHTML() );
        shtml = SafeHtmlUtils.fromTrustedString( "<div title='" + constants.AssetTableIsDisabledTip() + "'>" + icon.asString() + "</div>" );
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.safehtml.shared.SafeHtml

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.