Eric B created TILES-572:
----------------------------
Summary: OptionsRenderer throws IllegalStateException
Key: TILES-572
URL: https://issues.apache.org/jira/browse/TILES-572
Project: Tiles
Issue Type: Bug
Components: tiles-extras
Affects Versions: 3.0.1
Environment: Spring 3.2.4 / Tiles 3.0.1
Reporter: Eric B
Essentially, the error I get when trying to use the OptionsRenderer is:
java.lang.IllegalStateException: A matching list-attribute name="my_opts" must
be defined.
I tried to follow as best as possible the instructions on the
http://tech.finn.no/2012/07/25/the-ultimate-view-tiles-3/4/ site, but the
instructions seem rather old and obsolete and some classes referenced no longer
exist in Spring 3.2.4 and/or are configured differently.
>From what I can tell, it would appear that the context that the
>OptionsRenderer is receiving is not correct; the attributes and
>cascadedAttributes are both null, even though they should be set. However, I
>have been unable to trace why this is happening.
I have tried to instantiate the OptionsRenderer as follows:
public class TilesContainerFactory extends
CompleteAutoloadTilesContainerFactory {
@Override
protected Renderer createTemplateAttributeRenderer(BasicRendererFactory
rendererFactory, ApplicationContext applicationContext, TilesContainer
container,
AttributeEvaluatorFactory attributeEvaluatorFactory) {
Renderer renderer =
super.createTemplateAttributeRenderer(rendererFactory, applicationContext,
container, attributeEvaluatorFactory);
// create an Options Renderer
OptionsRenderer optionsRenderer = new
OptionsRenderer(applicationContext, renderer);
return optionsRenderer;
}
}
A google search finds other instances of people having trouble instantiating
this class as well.
--
This message was sent by Atlassian JIRA
(v6.1#6144)