struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kusuma Haranath Atmakuri <haranat...@yahoo.com>
Subject Re: Nested tiles question
Date Mon, 05 Apr 2010 01:21:10 GMT
Since the path is different for each of the layouts, that could be the reason why the resources
are not included. You can verify by looking at the source code that the BaseLayout.jsp is
not being used. You could try this:

<definition name="base.layout" 
path="/Madisons/StoreInfoArea/BaseLayout.jsp">
    <put name="includes" 
value="/Madisons/include/styles/default/AllTheResources.jsp"/>
</definition>


Hope this works out!


________________________________
From: Subir Kumar <subir.kumar@ymail.com>
To: user@struts.apache.org
Sent: Thu, April 1, 2010 3:30:05 PM
Subject: Nested tiles question

Hi guys,

This is a question for Struts Tiles group.

I've created more than one layout JSP for the site as there are more that one layout for the
site. But I also want to have kind of a parent layout JSP which has references to all global
resources - like javascript files etc. How can this be achieved? I tried following, but it
did not work, while JSPs are displayed fine I cannot access javascript functions from the
base layout

<tiles-definitions>

    <definition name="base.layout" path="/Madisons/StoreInfoArea/BaseLayout.jsp"/>
   
    <definition name="myaccount.layout" path="/Madisons/StoreInfoArea/MyAccountLayout.jsp"
extends="base.layout">
          <put name="header" value="/Madisons/include/styles/default/CachedHeaderDisplay.jsp"/>
          <put name="leftnav" value="/Madisons/include/styles/default/CachedLeftSidebarDisplay.jsp"/>
        <put name="footer" value="/Madisons/include/styles/default/CachedFooterDisplay.jsp"/>
  
    </definition>
   
    <definition name="Madisons.myaccount.shipping.page" extends="myaccount.layout">
         <put name="body" value="/Madisons/include/home/MyAccountShipping.jsp"/>
    </definition>
   
    <definition name="checkout.layout" path="/Madisons/StoreInfoArea/CheckoutLayout.jsp"
extends="base.layout">
          <put name="header" value="/Madisons/include/styles/default/CachedHeaderDisplay.jsp"/>
        <put name="footer" value="/Madisons/include/styles/default/CachedFooterDisplay.jsp"/>
  
    </definition>
   
    <definition name="Madisons.checkout.shipping.page" extends="checkout.layout">
         <put name="body" value="/Madisons/include/home/CheckoutShipping.jsp"/>
    </definition>   

</tiles-definitions>

Thanks,
Subir.


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message