Package com.google.gwt.safehtml.shared

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


        public void onClick(ClickEvent event) {
          // Set the info about the contact
          SafeHtmlBuilder sb = new SafeHtmlBuilder();
          sb.appendEscaped(contactName);
          sb.appendHtmlConstant("<br><i>");
          sb.appendEscaped(contactEmail);
          sb.appendHtmlConstant("</i>");
          contactInfo.setHTML(sb.toSafeHtml());

          // Show the popup of contact info
          int left = contactLink.getAbsoluteLeft() + 14;
View Full Code Here


        html.appendHtmlConstant("<ul>");
        if (localeItem != null) {
            html.appendHtmlConstant("<li>").appendEscaped("Locale: The user interface language.");
        }
        html.appendHtmlConstant("<li>").appendEscaped("Analytics: We track browser and operating system information in order to improve the user interface. ");
        html.appendEscaped("You can disable the analytics feature at anytime.");

        //html.appendHtmlConstant("<li>").appendEscaped("Security Cache: If disabled the security context will be re-created everytime you access a dialog (performance hit).");
        html.appendHtmlConstant("</ul>");
        StaticHelpPanel help = new StaticHelpPanel(html.toSafeHtml());
        layout.add(help.asWidget());
View Full Code Here

                                               c );
                column.render( context,
                               rowData,
                               cellBuilder );
            } else {
                cellBuilder.appendEscaped( "<otherwise>" );
            }
            divText.setInnerHTML( cellBuilder.toSafeHtml().asString() );

            // Construct the table
            tce.appendChild( div );
View Full Code Here

    }

    private void addItem(final TreeItem root, final MavenArtifact artifact, final Collection<MavenArtifact> unchecked) {
        final SafeHtmlBuilder sb = new SafeHtmlBuilder();
        sb.append(SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(images.modelAsset()).getHTML()));
        sb.appendEscaped(" ").appendEscaped(artifact.toLabel());

        final CheckBox checkBox = new CheckBox(sb.toSafeHtml());
        if (!unchecked.contains(artifact)) {
            checkBox.setValue(true);
        }
View Full Code Here

        Set<String> roles = bootstrap.getRoles();
        SafeHtmlBuilder sb = new SafeHtmlBuilder();
        sb.appendHtmlConstant("<div class='roles-menu'>");
        for(String role : roles)
        {
            sb.appendEscaped(role).appendHtmlConstant("<br/>");
        }
        sb.appendHtmlConstant("<div>");

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

            SafeHtmlBuilder runAsRole = new SafeHtmlBuilder();
            runAsRole.appendHtmlConstant("<i class='icon-flag'></i>&nbsp;").appendEscaped("Run as");
            if (bootstrap.getRunAs()!=null) {
                runAsRole.appendHtmlConstant("&nbsp;").appendEscaped(bootstrap.getRunAs());
            } else {
                runAsRole.appendEscaped("...");
            }

            runAsBtn.setHTML(runAsRole.toSafeHtml());
            runAsBtn.addClickHandler(new ClickHandler() {
                @Override
View Full Code Here

                    SafeHtmlBuilder html = new SafeHtmlBuilder();
                    int i=0;
                    for(String detail : validation.getMessages())
                    {
                        if(i==0) html.appendHtmlConstant("<b>");
                        html.appendEscaped(detail).appendHtmlConstant("<br/>");
                        if(i==0) html.appendHtmlConstant("</b>");

                        i++;
                    }
View Full Code Here

                                SafeHtmlBuilder html = new SafeHtmlBuilder();
                                int i=0;
                                for(String detail : result.getMessages())
                                {
                                    if(i==0) html.appendHtmlConstant("<b>");
                                    html.appendEscaped(detail).appendHtmlConstant("<br/>");
                                    if(i==0) html.appendHtmlConstant("</b>");

                                    i++;
                                }
View Full Code Here

        form.setNumColumns(2);

        form.bind(table);

        SafeHtmlBuilder description = new SafeHtmlBuilder();
        description.appendEscaped("Bootstrap context for resource adapters. Each context does reference a workmanager. ");

        FormToolStrip<JcaBootstrapContext> formTools = new FormToolStrip<JcaBootstrapContext>(
                form,
                new FormToolStrip.FormCallback<JcaBootstrapContext>() {
                    @Override
View Full Code Here

    for (final Map.Entry<String, AuthScope> scope : scopesFromDiscovery.entrySet()) {
      // Add the check box to the table.
      CheckBox scopeToggle = new CheckBox();

      SafeHtmlBuilder safeHtml = new SafeHtmlBuilder();
      safeHtml.appendEscaped(scope.getKey()).appendHtmlConstant("<br><span>")
          .appendEscaped(scope.getValue().getDescription()).appendHtmlConstant("</span>");
      scopeToggle.setHTML(safeHtml.toSafeHtml());

      scopeToggle.addStyleName(style.discoveryScopeSelector());
      scopePanel.add(scopeToggle);
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.