Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce convenient boolean configuration attribute for enabling auto-refresh of Tiles definitions [SPR-7225] #11884

Closed
spring-projects-issues opened this issue May 20, 2010 · 3 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Keith Donald opened SPR-7225 and commented

As of Tiles 2.1, Tiles has an boolean attribute that, if set to true, will turn on "auto refresh checking" for TIles definitions. This allows changes to Tiles definitions to be picked up in development without a server restart.

The current way of turning on a auto-refresh check is low-level. With Tiles 2.1, you set a custom tilesProperties on your TilesConfigurer with the "org.apache.tiles.definition.dao.LocaleUrlDefinitionDAO.CHECK_REFRESH" property set to true. (Reference: http://tiles.apache.org/2.1/framework/config-reference.html). I believe the mechanism in Tiles 2.2 for enabling this check is different.

As a user, I'd like a simple boolean property on TilesConfigurer to enable auto-refresh checks that works with Tiles 2.1 and > e.g.:

<beans:bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
	<beans:property name="definitions">
		<beans:value>
			/WEB-INF/layouts/tiles.xml,
			/WEB-INF/views/*/tiles.xml
		</beans:value>
	</beans:property>
	<beans:property name="autoRefresh" value="true" />
</beans:bean>

Affects: 3.0.2

Referenced from: commits 0390c2b

@spring-projects-issues
Copy link
Collaborator Author

Keith Donald commented

Here is a complete example of how to enable this check today with Tiles 2.1:

<!-- Initializes the Apache Tiles CompositeView system -->
<beans:bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
	<beans:property name="definitions">
		<beans:value>
			/WEB-INF/layouts/tiles.xml,
			/WEB-INF/views/*/tiles.xml
		</beans:value>
	</beans:property>
	<beans:property name="tilesProperties">
		<beans:props>
			<beans:prop key="org.apache.tiles.definition.dao.LocaleUrlDefinitionDAO.CHECK_REFRESH">true</beans:prop>
		</beans:props>
	</beans:property>
</beans:bean>

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I've added a convenient "checkRefresh" bean property to TilesConfigurer. Works for me against Tiles 2.1 as well as 2.2 in a quick test. Would be great if you could give it a full integration test, ideally against both Tiles versions as well...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Ryan Walsh commented

I know years have passed, but I can't get this working. I've asked for help here (http://stackoverflow.com/questions/18859970/automatically-reload-apache-tiles-2-2-xml-definition-files) but haven't gotten responses. Any ideas? Thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants