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

xapi.ui.html.X_Html Maven / Gradle / Ivy

Go to download

This module exists solely to package all other gwt modules into a single uber jar. This makes deploying to non-mavenized targets much easier. Of course, you would be wise to inherit your dependencies individually; the uber jar is intended for projects like collide, which have complex configuration, and adding many jars would be a pain.

The newest version!
package xapi.ui.html;

import xapi.inject.X_Inject;
import xapi.ui.api.StyleService;
import xapi.ui.html.api.HtmlService;
import xapi.ui.html.api.HtmlSnippet;

public class X_Html {

  private X_Html() {}

  @SuppressWarnings({ "unchecked", "rawtypes" })
  public static  String toHtml(Class template, Class cls, T o, StyleService context) {
    return toSnippet(template, (Class)cls, context).convert(o);
  }

  public static  String toHtml(Class cls, T o, StyleService context) {
    return toHtml(cls,  cls, o, context);
  }

  public static  HtmlSnippet toSnippet(Class cls, StyleService context) {
    return toSnippet(cls, cls, context);
  }

  public static  HtmlSnippet toSnippet(Class templateClass, Class cls, StyleService context) {
    return X_Inject.singleton(HtmlService.class).toSnippet(templateClass, cls, context);
  }

  public static void injectCss(final Class cls, StyleService context) {
    X_Inject.singleton(HtmlService.class).injectStyle(cls, context);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy