Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tiles put-list-attribute inheritance

 
Amit Goda
Ranch Hand
Posts: 37
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I am using Tiles 2.1 and I am facing a problem regarding the put-list-attribute inheritance.
Following is my tiles-defs.xml



and following is how i am implementing Javascript and CSS on my baseLayout.jsp



The problem is when home definition is called, it overrides the default value of put-list-attribute, i.e when i view the Login page the style.css and jquery.js are applied to the page,
but when i redirect to the home page, the home definition's put-list-attribute overrides the baseLayout's put-list-attribute

so the home page contains SpryAssets/SpryMenuBarHorizontal.css and SpryAssets/SpryMenuBar.js but my basic style.css and jquery.js is being removed from the page.

This behavior is spoiling the style of my webpage and some scripts based on jquery is not working.

But on my home page i want both the CSS and javacript to be present.

Thank you for your replies in advance.
 
Amit Goda
Ranch Hand
Posts: 37
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again,

There's no reply on this thread, but after two day of googling and trying to solve the above error i finally found the cause.

My struts 2 implementation was using Tiles 2.0.6, and inheritance was not taking place.

Than i found this link which stated that inheritance is taking place but all the files are repeated with each level of inheritance.

Thus the Tiles version below 2.1.3 had bugs related to Tiles put-list-attribute inheritance and it was resolved in version 2.1.3.

Tiles bug 2.1.3 can be seen here


So i changed the Tiles version to 2.2.2.

And hurray my put-list-inheritance worked with the very first try.

Cheers!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic