[ https://issues.apache.org/jira/browse/TILES-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mck SembWever resolved TILES-572. --------------------------------- Resolution: Not A Problem The primary problem here was the cascade="true" was not being specified on the list-attribute, so the OptionsRenderer was working the first-time when in the template attribute, but not the second-time once a new AttributeContext was pushed onto the stack. Eric B, also hit problems related OptionsRenderer in 3.0.1 not being compatible with the tiles3 integration found in spring-3.2 (which had already been fixed with http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/renderer/OptionsRenderer.java?r1=1368433&r2=1422025 but not released) > 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 > Assignee: Mck SembWever > Labels: features > > 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: > {code} > 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; > } > } > {code} > 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)