Examples of RendererFactory


Examples of org.apache.tiles.renderer.RendererFactory

        getRequestContextFactory.setAccessible(true);
        Method createRendererFactory = BasicTilesContainerFactory.class.getDeclaredMethod("createRendererFactory",
            TilesApplicationContext.class, TilesRequestContextFactory.class, TilesContainer.class, aef);
        createRendererFactory.setAccessible(true);
        BasicTilesContainerFactory tcf = new BasicTilesContainerFactory();
        RendererFactory rendererFactory = (RendererFactory) createRendererFactory.invoke(
            tcf, container.getApplicationContext(), getRequestContextFactory.invoke(container),
            container, baefValue);
        container.setRendererFactory(rendererFactory);
      }
      catch (Exception ex) {
View Full Code Here

Examples of org.apache.tiles.renderer.RendererFactory

                .createRequestContextFactory(applicationContext);
        LocaleResolver resolver = factory.createLocaleResolver(applicationContext,
                requestContextFactory);
        AttributeEvaluator evaluator = factory.createEvaluator(applicationContext,
                requestContextFactory, resolver);
        RendererFactory rendererFactory = factory.createRendererFactory(
                applicationContext, requestContextFactory, container, evaluator);
        assertTrue("The class of the renderer factory is not correct",
                rendererFactory instanceof BasicRendererFactory);
        AttributeRenderer renderer = rendererFactory.getRenderer("string");
        assertNotNull("The string renderer is null", renderer);
        assertTrue("The string renderer class is not correct",
                renderer instanceof StringAttributeRenderer);
        renderer = rendererFactory.getRenderer("template");
        assertNotNull("The template renderer is null", renderer);
        assertTrue("The template renderer class is not correct",
                renderer instanceof TemplateAttributeRenderer);
        renderer = rendererFactory.getRenderer("definition");
        assertNotNull("The definition renderer is null", renderer);
        assertTrue("The definition renderer class is not correct",
                renderer instanceof DefinitionAttributeRenderer);
    }
View Full Code Here

Examples of org.apache.tiles.renderer.RendererFactory

        TilesRequestContextFactory requestContextFactory =
            (TilesRequestContextFactory) createFactory(configuration,
                REQUEST_CONTEXT_FACTORY_INIT_PARAM);
        requestContextFactory.init(configuration);

        RendererFactory rendererFactory =
            (RendererFactory) createFactory(configuration,
                RENDERER_FACTORY_INIT_PARAM);

        AttributeEvaluator evaluator = (AttributeEvaluator) createFactory(
                configuration, ATTRIBUTE_EVALUATOR_INIT_PARAM);

        if (evaluator instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) evaluator)
                    .setApplicationContext(context);
        }

        if (evaluator instanceof TilesContainerAware) {
            ((TilesContainerAware) evaluator).setContainer(container);
        }

        evaluator.init(configuration);

        if (rendererFactory instanceof TilesRequestContextFactoryAware) {
            ((TilesRequestContextFactoryAware) rendererFactory)
                    .setRequestContextFactory(requestContextFactory);
        }

        if (rendererFactory instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) rendererFactory)
                    .setApplicationContext(context);
        }

        if (rendererFactory instanceof TilesContainerAware) {
            ((TilesContainerAware) rendererFactory).setContainer(container);
        }

        if (rendererFactory instanceof AttributeEvaluatorAware) {
            ((AttributeEvaluatorAware) rendererFactory).setEvaluator(evaluator);
        }
        rendererFactory.init(initParameters);

        PreparerFactory prepFactory =
            (PreparerFactory) createFactory(configuration,
                PREPARER_FACTORY_INIT_PARAM);
View Full Code Here

Examples of org.apache.tiles.renderer.RendererFactory

        contextFactory.init(configuration);

        TilesApplicationContext tilesContext =
            contextFactory.createApplicationContext(context);

        RendererFactory rendererFactory =
            (RendererFactory) createFactory(configuration,
                RENDERER_FACTORY_INIT_PARAM);

        AttributeEvaluator evaluator = (AttributeEvaluator) createFactory(
                configuration, ATTRIBUTE_EVALUATOR_INIT_PARAM);

        if (evaluator instanceof TilesContextFactoryAware) {
            ((TilesContextFactoryAware) evaluator)
                    .setContextFactory(contextFactory);
        }

        if (evaluator instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) evaluator)
                    .setApplicationContext(tilesContext);
        }

        if (evaluator instanceof TilesContainerAware) {
            ((TilesContainerAware) evaluator).setContainer(container);
        }

        evaluator.init(configuration);

        if (rendererFactory instanceof TilesContextFactoryAware) {
            ((TilesContextFactoryAware) rendererFactory)
                    .setContextFactory(contextFactory);
        }

        if (rendererFactory instanceof TilesApplicationContextAware) {
            ((TilesApplicationContextAware) rendererFactory)
                    .setApplicationContext(tilesContext);
        }

        if (rendererFactory instanceof TilesContainerAware) {
            ((TilesContainerAware) rendererFactory).setContainer(container);
        }

        if (rendererFactory instanceof AttributeEvaluatorAware) {
            ((AttributeEvaluatorAware) rendererFactory).setEvaluator(evaluator);
        }
        rendererFactory.init(initParameters);

        PreparerFactory prepFactory =
            (PreparerFactory) createFactory(configuration,
                PREPARER_FACTORY_INIT_PARAM);
View Full Code Here

Examples of org.apache.tiles.renderer.RendererFactory

                .createApplicationContext(context);
        LocaleResolver resolver = factory.createLocaleResolver(context,
                applicationContext, contextFactory);
        AttributeEvaluator evaluator = factory.createEvaluator(context,
                applicationContext, contextFactory, resolver);
        RendererFactory rendererFactory = factory.createRendererFactory(
                context, applicationContext, contextFactory, container,
                evaluator);
        assertTrue("The class of the renderer factory is not correct",
                rendererFactory instanceof BasicRendererFactory);
        AttributeRenderer renderer = rendererFactory.getRenderer("string");
        assertNotNull("The string renderer is null", renderer);
        assertTrue("The string renderer class is not correct",
                renderer instanceof StringAttributeRenderer);
        renderer = rendererFactory.getRenderer("template");
        assertNotNull("The template renderer is null", renderer);
        assertTrue("The template renderer class is not correct",
                renderer instanceof TemplateAttributeRenderer);
        renderer = rendererFactory.getRenderer("definition");
        assertNotNull("The definition renderer is null", renderer);
        assertTrue("The definition renderer class is not correct",
                renderer instanceof DefinitionAttributeRenderer);
    }
View Full Code Here

Examples of org.apache.tiles.request.render.RendererFactory

    public void testCreateRendererFactory() {
        TilesContainer container = factory.createContainer(applicationContext);
        LocaleResolver resolver = factory.createLocaleResolver(applicationContext);
        AttributeEvaluatorFactory attributeEvaluatorFactory = factory.createAttributeEvaluatorFactory(
                applicationContext, resolver);
        RendererFactory rendererFactory = factory.createRendererFactory(applicationContext, container,
                attributeEvaluatorFactory);
        assertTrue("The class of the renderer factory is not correct", rendererFactory instanceof BasicRendererFactory);
        Renderer renderer = rendererFactory.getRenderer("string");
        assertNotNull("The string renderer is null", renderer);
        assertTrue("The string renderer class is not correct", renderer instanceof StringRenderer);
        renderer = rendererFactory.getRenderer("template");
        assertNotNull("The template renderer is null", renderer);
        assertTrue("The template renderer class is not correct", renderer instanceof DispatchRenderer);
        renderer = rendererFactory.getRenderer("definition");
        assertNotNull("The definition renderer is null", renderer);
        assertTrue("The definition renderer class is not correct", renderer instanceof DefinitionRenderer);
    }
View Full Code Here

Examples of org.eobjects.analyzer.result.renderer.RendererFactory

  }

  @Provides
  public RendererFactory getRendererFactory(DescriptorProvider descriptorProvider,
      DCRendererInitializer rendererInitializer) {
    return new RendererFactory(descriptorProvider, rendererInitializer);
  }
View Full Code Here

Examples of org.eobjects.analyzer.result.renderer.RendererFactory

    if (resultFuture.isErrornous()) {
      throw resultFuture.getErrors().get(0);
    }

    List<AnalyzerResult> list = Collections.emptyList();
    RendererFactory rendererFactory = new RendererFactory(conf.getDescriptorProvider(), null);
    DetailsResultWindow window = new DetailsResultWindow("Example", list, new DCWindowContext(conf,
        UserPreferences.getInstance()), rendererFactory);
    window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    List<AnalyzerResult> results = resultFuture.getResults();
View Full Code Here

Examples of org.eobjects.analyzer.result.renderer.RendererFactory

    return renderInternal(result, true);
  }

  public RendererFactory getRendererFactory() {
    if (_rendererFactory == null) {
      _rendererFactory = new RendererFactory(descriptorProvider, _rendererInitializerProvider.get());
    }
    return _rendererFactory;
  }
View Full Code Here

Examples of org.eobjects.analyzer.result.renderer.RendererFactory

      Provider<DCRendererInitializer> rendererInitializerProvider) {
    super(windowContext);
    _configuration = configuration;
    _job = job;
    _jobFilename = jobFilename;
    _rendererFactory = new RendererFactory(configuration.getDescriptorProvider(), rendererInitializerProvider.get());

    _progressInformationPanel = new ProgressInformationPanel();
    _tabbedPane.addTab("Progress information", imageManager.getImageIcon("images/model/progress_information.png"),
        _progressInformationPanel);
    _tabbedPane.setUnclosableTab(0);
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.