Hi,

I am trying to redesign a site with tiles and want to use several
layout-definitions. One for the layout of the whole site and several for the
different types of content. Hence, my question: Is it possible to predefine
the attributes in only one definition-file that refers to the mainLayout?
As you can see from the enclosed code-snippets I predefine all attributes
(including the modul-attributes form the modulLayout) in the
mainContnetDef.jsf although I define the content-type attribute(which refers
to the modulLayout) in the modul.jsp. Is that possible so? Or do I have to
write a extra definition for the modulLayout?

thanks in advance!!
dominik

<%-- mainLayout.jsf --%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
<html:html>
<head>
<title><bean:message key="global.title"/></title>
<html:base/>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
      <table>
        <tr>
         <td colspan=2>
          <tiles:insert attribute="header" />
         </td>
        </tr>
        <tr>
         <td>
          <tiles:insert attribute="menubar"/>
         </td>
         <td>
          <tiles:insert attribute="body-content"/>
         </td>
        </tr>
        <tr>
         <td colspan=2>
          <tiles:insert attribute="copyright"/>
         </td>
        </tr>
      </table>
</body>
</html:html>

<%-- modulLayout.jsf --%>
<center>
  <table>
    <tr>
      <td>
        <tiles:insert attribute="modul1"/>
      </td>
      <td>
        <tiles:insert attribute="modul2"/>
      </td>
    </tr>
    <tr>
      <td colspan=2>
        <tiles:insert attribute="modul3"/>
      </td>
    </tr>
  </table>
</center>

<%-- mainContentDef.jsf --%>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
<tiles:definition id="defaultContent"
page="/layouts/mainLayout.jsp" scope="request">
<tiles:put name="header" value="/common/header.jsf" />
<tiles:put name="menubar" value="/common/menubar.jsf" />
<tiles:put name="copyright" value="/common/copyright.jsf" />
<tiles:put name="modul1" value="/modules/modul1.jsf" />
<tiles:put name="modul2" value="/modules/modul2.jsf" />
<tiles:put name="modul3" value="/modules/modul3.jsf" />
</tiles:definition>

<%-- modules.jsp --%>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
<[EMAIL PROTECTED] file="../common/mainContentDef.jsf" %>
<tiles:insert beanName="defaultContent" beanScope="request">
<tiles:put name="content-type" value="../layouts/modulLayout.jsf"/>
</tiles:insert>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to