tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric B <ebe...@hotmail.com>
Subject OptionsRenderer not working
Date Sat, 26 Oct 2013 05:20:28 GMT
I have spent a lot of time on this today, trying to debug & understand 
how the OptionsRenderer is working, but failing at it.  I don't know the 
internals of Tiles too much, so I'm a bit at a loss of understanding all 
the contexts that are being pushed onto a stack and looked up/popped off.

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 

 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 also note that this is an ongoing problem for several people already, 
but no solution(s) have been proposed.  Ex: 
https://issues.apache.org/jira/browse/TILES-569, etc.

I have tried to instantiate the OptionsRenderer as follows:

public class TilesContainerFactory extends 
CompleteAutoloadTilesContainerFactory {

	protected Renderer createTemplateAttributeRenderer(BasicRendererFactory 
rendererFactory, ApplicationContext applicationContext, TilesContainer 
			AttributeEvaluatorFactory attributeEvaluatorFactory) {
		Renderer renderer = 
applicationContext, container, attributeEvaluatorFactory);
		// create an Options Renderer
		OptionsRenderer optionsRenderer = new 
OptionsRenderer(applicationContext, renderer);
		return optionsRenderer;



Can someone please explain if/how to get this class to work?



View raw message