Skip to content

Cannot put <tiles:definition> inside <tiles:putAttribute> [SPR-14311] #18883

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

Closed
spring-projects-issues opened this issue May 27, 2016 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Antonio Petrelli opened SPR-14311 and commented

When using Tiles 3 in JSP pages, if I have a mutable container I can do:
<tiles:putAttribute name="myname">
<tiles:definition template="...">
</tiles:definition>
</tiles:putAttribute>

This does not work with SpringConfigurer.

It seems that the problem relies in:
TilesConfigurer.SpringTilesContainerFactory.createContainer
The problem is that the DefinitionRenderer takes the non-decorated container.

Solution that I suggest:
override method createDecoratedContainer instead of createContainer.

Workaround: use your own TilesInitializer.


Affects: 4.2.6

Backported to: 4.2.7

@spring-projects-issues
Copy link
Collaborator Author

Antonio Petrelli commented

I disagree being an improvement, sorry. Tiles alone works fine when used on its own, the use that the Spring initializer does is not correct.
So it is a bug IMHO.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

This will be available in the upcoming 4.3.0.BUILD-SNAPSHOT: If you have the chance, please give it a try! It's also scheduled for a backport to 4.2.7 now.

@spring-projects-issues
Copy link
Collaborator Author

Antonio Petrelli commented

Thank you Jurgen! It works!
That was fast, thanks a lot!
I will wait for the upcoming 4.2.7 release then, in the meantime I'm using the workaround.

Best regards
Antonio

@spring-projects-issues spring-projects-issues added type: bug A general bug status: backported An issue that has been backported to maintenance branches in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.3 GA milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants