You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Eric B (JIRA)" <ji...@apache.org> on 2013/10/26 07:27:30 UTC

[jira] [Updated] (TILES-572) OptionsRenderer throws IllegalStateException

     [ https://issues.apache.org/jira/browse/TILES-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric B updated TILES-572:
-------------------------

    Description: 
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.  

  was:
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.  


> 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
>              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)