コード例 #1
0
  @Override
  protected Renderer createDefaultAttributeRenderer(
      BasicRendererFactory rendererFactory,
      ApplicationContext applicationContext,
      TilesContainer container,
      AttributeEvaluatorFactory attributeEvaluatorFactory) {

    ChainedDelegateRenderer retValue = new ChainedDelegateRenderer();
    retValue.addAttributeRenderer(rendererFactory.getRenderer(DEFINITION_RENDERER_NAME));
    retValue.addAttributeRenderer(rendererFactory.getRenderer(FREEMARKER_RENDERER_NAME));
    retValue.addAttributeRenderer(rendererFactory.getRenderer(TEMPLATE_RENDERER_NAME));
    retValue.addAttributeRenderer(rendererFactory.getRenderer(STRING_RENDERER_NAME));
    return retValue;
  }
コード例 #2
0
  @Override
  protected void registerAttributeRenderers(
      final BasicRendererFactory rendererFactory,
      final ApplicationContext applicationContext,
      final TilesContainer container,
      final AttributeEvaluatorFactory attributeEvaluatorFactory) {

    super.registerAttributeRenderers(
        rendererFactory, applicationContext, container, attributeEvaluatorFactory);

    StrutsFreeMarkerAttributeRenderer freemarkerRenderer = new StrutsFreeMarkerAttributeRenderer();

    rendererFactory.registerRenderer(FREEMARKER_RENDERER_NAME, freemarkerRenderer);
  }