Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Tiles put-list-attribute inheritance

 
Ranch Hand
Posts: 37
Netbeans IDE Eclipse IDE Java
  • 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
Netbeans IDE Eclipse IDE Java
  • 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!!!
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic