Hello all,

In the template tag example, the template file used the table and table row
to indicate where in the layout to insert the content. Is there a way to
build the template file using frame instead of table? How do you specify the
src so that it will take <template:get name="anything"/> to be the file to
be displayed in the frame? In other world, how do you change the following
code:


<%@ taglib uri="/struts-template.tld" prefix="template" %>

<%-- Layout component
  parameters : title, header, menu, body, footer
--%>
  <HEAD>
    <title><template:get name="title"/></title>
  </HEAD>

<body>
<table>
  <tr>
    <td valign="top"><template:get name="header"/></td>
  </tr>
  <tr>
    <td width="25%" valign="top"><template:get name='menu'/></td>
    <td colspan="100%">
    <table> <template:get name="main" /> </table>
   </td>
  </tr>
  <tr>
    <td colspan="2">
      <template:get name="footer" />
    </td>
</tr>
</table>

To this code:

<%@ taglib uri="/struts-template.tld" prefix="template" %>

<%-- Frameset Layout component
  parameters : title, header, menu, body, footer
--%>

<html>
<head>
    <title><template:get name="title"/></title>
</head>
<frameset  rows="16%,*" cols="19%,*">
    <frame name="logoFrame" src="Logo.gif" marginwidth="5" marginheight="5"
scrolling="no" border="0" frameborder="no" noresize>
    <frame name="headerFrame" src="" marginwidth="5" marginheight="5"
scrolling="no" border="0"  frameborder="no" noresize>
    <frame name="menuFrame" src="" marginwidth="0" marginheight="5"
scrolling="auto" border="0"  frameborder="no" noresize>
    <frameset  rows="84%,*">
        <frame name="mainFrame" src="" marginwidth="5" marginheight="5"
scrolling="auto" border="0" frameborder="no" noresize>
        <frame name="footerFrame" src="" marginwidth="5" marginheight="5"
scrolling="no" border="0" frameborder="no" noresize>
    </frameset>
</frameset>

</html>

I tried to put src="<template:get name='header'/>" but it didn't work.


Is it possible of using frame with template or table and row are the only
choices? Thank you very much for your help.


Reply via email to