Examples of WidgetRegistry


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


  @Test
  public final void readXmlWidgetWithChildren() {

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

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

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

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

    });
    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

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(Object.class)
            .compile("<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(Object.class)
            .compile("<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(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

Examples of ro.fortsoft.wicket.dashboard.WidgetRegistry

    super.init();
   
    // register some widgets
    dashboardContext = new DashboardContext();
    dashboardContext.setDashboardPersiter(new UserDashboardPersister());
    WidgetRegistry widgetRegistry = dashboardContext.getWidgetRegistry();
    widgetRegistry.registerWidget(new PrivateRoomsWidgetDescriptor());
    widgetRegistry.registerWidget(new WelcomeWidgetDescriptor());
    widgetRegistry.registerWidget(new StartWidgetDescriptor());
    widgetRegistry.registerWidget(new RssWidgetDescriptor());
    // add dashboard context injector
    getComponentInstantiationListeners().add(new DashboardContextInjector(dashboardContext));
    DashboardSettings dashboardSettings = DashboardSettings.get();
    dashboardSettings.setIncludeJQuery(false);
    dashboardSettings.setIncludeJQueryUI(false);
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.WidgetRegistry

    super.init();
   
    // register some widgets
    dashboardContext = new DashboardContext();
    dashboardContext.setDashboardPersiter(new UserDashboardPersister());
    WidgetRegistry widgetRegistry = dashboardContext.getWidgetRegistry();
    widgetRegistry.registerWidget(new PrivateRoomsWidgetDescriptor());
    widgetRegistry.registerWidget(new WelcomeWidgetDescriptor());
    widgetRegistry.registerWidget(new StartWidgetDescriptor());
    widgetRegistry.registerWidget(new RssWidgetDescriptor());
    // add dashboard context injector
    getComponentInstantiationListeners().add(new DashboardContextInjector(dashboardContext));
    DashboardSettings dashboardSettings = DashboardSettings.get();
    dashboardSettings.setIncludeJQuery(false);
    dashboardSettings.setIncludeJQueryUI(false);
View Full Code Here

Examples of ro.fortsoft.wicket.dashboard.WidgetRegistry

    super.init();
   
    // register some widgets
    dashboardContext = new DashboardContext();
    dashboardContext.setDashboardPersiter(new UserDashboardPersister());
    WidgetRegistry widgetRegistry = dashboardContext.getWidgetRegistry();
    widgetRegistry.registerWidget(new MyRoomsWidgetDescriptor());
    widgetRegistry.registerWidget(new WelcomeWidgetDescriptor());
    widgetRegistry.registerWidget(new StartWidgetDescriptor());
    widgetRegistry.registerWidget(new RssWidgetDescriptor());
    // add dashboard context injector
    getComponentInstantiationListeners().add(new DashboardContextInjector(dashboardContext));
    DashboardSettings dashboardSettings = DashboardSettings.get();
    dashboardSettings.setIncludeJQuery(false);
    dashboardSettings.setIncludeJQueryUI(false);
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.