Package com.google.sitebricks.rendering.control

Examples of com.google.sitebricks.rendering.control.WidgetRegistry


        .getInstance(PageBook.class);

    book.at("/somewhere", MyEmbeddedPage.class).apply(Chains.terminal());


    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);
    registry.addEmbed("myfave");

    Renderable widget =
        new XmlTemplateCompiler(Object.class, new MvelEvaluatorCompiler(TestBackingType.class), registry, book, metrics)
            .compile("<xml><div class='content'>hello @MyFave(should=false)<a href='/hi/${id}'>hideme</a></div></xml>");
View Full Code Here


    });
    final PageBook book = injector      //hacky, where are you super-packages!
        .getInstance(PageBook.class);


    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);
    registry.addEmbed("myfave");

    Renderable widget =
        new XmlTemplateCompiler(Object.class, new MvelEvaluatorCompiler(TestBackingType.class), registry, pageBook, metrics)
            .compile("<xml><div class='content'>hello @MyFave(should=false)<a href='/hi/${id}'>hideme</a></div></xml>");
View Full Code Here

  @Test(dataProvider = ANNOTATION_EXPRESSIONS)
  public final void readAWidgetWithVariousExpressions(String expression) {
    final Evaluator evaluator = new MvelEvaluator();

    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);

    String templateValue = String.format("<html><#if %s><p>hello</p></#if></html>", expression);

    System.out.println( templateValue );
   
View Full Code Here

      }
    });

    final Evaluator evaluator = new MvelEvaluator();

    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);


    Renderable widget =
        new FreemarkerTemplateCompiler(Object.class)
            .compile("<html><#if false><p>hello</p></#if></html>");
View Full Code Here


  @Test
  public final void readHtmlWidget() {

    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);

    Renderable widget =
        new FreemarkerTemplateCompiler(Object.class)
            .compile("<html><div class='${clazz}'>hello</div></html>");
View Full Code Here


  @Test
  public final void readHtmlWidgetWithChildren() {

    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);

    Renderable widget =
        new FreemarkerTemplateCompiler(Object.class)
            .compile("<!doctype html><html><body><div class='${clazz}'>hello <#if false><a href='/hi/${id}'>hideme</a></#if></div></body></html>");
View Full Code Here

TOP

Related Classes of com.google.sitebricks.rendering.control.WidgetRegistry

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.