All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xapi.gwt.ui.autoui.client.SafeHtmlUserInterface Maven / Gradle / Ivy

Go to download

Everything needed to run a comprehensive dev environment. Just type X_ and pick a service from autocomplete; new dev modules will be added as they are built. The only dev service not included in the uber jar is xapi-dev-maven, as it includes all runtime dependencies of maven, adding ~4 seconds to build time, and 6 megabytes to the final output jar size (without xapi-dev-maven, it's ~1MB).

The newest version!
package xapi.gwt.ui.autoui.client;

import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;

import xapi.gwt.ui.autoui.api.IsSafeHtmlBuilder;
import xapi.ui.autoui.api.UiRenderingContext;
import xapi.ui.autoui.impl.AbstractUserInterface;

public class SafeHtmlUserInterface  extends AbstractUserInterface implements IsSafeHtmlBuilder {

  private final SafeHtmlBuilder out = new SafeHtmlBuilder();
  
  @Override
  protected void doRender(UiRenderingContext ctx, T model) {
    startRender(out, model);
    recursiveRender(ctx, ctx.getRenderer(), model);
    endRender(out, model);
  }

  protected void endRender(SafeHtmlBuilder out, T model) {
    
  }

  protected void startRender(SafeHtmlBuilder out, T model) {
    
  }
  
  public SafeHtml getSafeHtml() {
    return out.toSafeHtml();
  }

  @Override
  public SafeHtmlBuilder getSafeHtmlBuilder() {
    return out;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy