Examples of WidgetRegistry


Examples of com.citytechinc.cq.component.dialog.widget.WidgetRegistry

      Reflections reflections = ComponentMojoUtil.getReflections(classLoader);

      List<CtClass> classList = ComponentMojoUtil.getAllComponentAnnotations(classPool, reflections, getExcludedClasses());

      WidgetRegistry widgetRegistry = new DefaultWidgetRegistry(classPool, classLoader, reflections);

      Map<String, ComponentNameTransformer> transformers = ComponentMojoUtil.getAllTransformers(classPool,
        reflections);

      ComponentNameTransformer transformer = transformers.get(transformerName);
View Full Code Here

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

  @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

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

      }
    });

    final Evaluator evaluator = new MvelEvaluator();

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


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

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


  @Test
  public final void readHtmlWidget() {

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

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

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


  @Test
  public final void readHtmlWidgetWithChildren() {

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

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

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

    assert "asodkoas".equals(Dom.extractKeyAndContent("@Thing(asodkoas)  kko")[1]) : "Extraction wrong: ";
  }

  @Test
  public final void readShowIfWidgetTrue() {
    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);

    final MvelEvaluatorCompiler compiler = new MvelEvaluatorCompiler(TestBackingType.class);
    Renderable widget =
        new HtmlTemplateCompiler(Object.class, compiler, registry, pageBook, metrics)
          .compile("<html>@ShowIf(true)<p>hello</p></html>");
View Full Code Here

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

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

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


    Renderable widget =
        new HtmlTemplateCompiler(Object.class, new MvelEvaluatorCompiler(Object.class), registry, pageBook, metrics)
            .compile(String.format("<html>@ShowIf(%s)<p>hello</p></html>", expression));
View Full Code Here

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

      }
    });

    final Evaluator evaluator = new MvelEvaluator();

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


    Renderable widget =
        new HtmlTemplateCompiler(Object.class, new MvelEvaluatorCompiler(Object.class), registry, pageBook, metrics)
            .compile("<html>@ShowIf(false)<p>hello</p></html>");
View Full Code Here

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

        bind(HttpServletRequest.class).toProvider(mockRequestProviderForContext());
      }
    });


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


    Renderable widget =
        new HtmlTemplateCompiler(Object.class, new MvelEvaluatorCompiler(TestBackingType.class), registry, pageBook, metrics)
            .compile("<html><div class='${clazz}'>hello <a href='/people/${id}'>${name}</a></div></html>");
View Full Code Here

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

    Parsing.setTypeConverter(converter);

    final PageBook pageBook = injector.getInstance(PageBook.class);


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


    Renderable widget =
        new HtmlTemplateCompiler(Object.class, new MvelEvaluatorCompiler(TestBackingType.class), registry, pageBook, metrics)
            .compile("<html> <head>" +
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.