Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HELP with tiles

 
Rashid Darvesh
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Can anyone let me know how to use tiles insert tag with frameset tag.
i have the following tiles def in my tiles-def.xml
<definition name="jyu" path="/Layout.jsp">
<put name="title" value="Josh" />
<put name="header" value="Header.jsp" />
<put name="body" value ="Sports.jsp"/>
<put name="footer" value="Footer.jsp"/>
</definition>
and in my jsp want tohave something like this
<frameset border =1 cols="12%,*" >
<frame name="left" src=<tiles:insert attribute="header"/>>
<frame name="right" src=<tiles:insert attribute="body"/>>
</frameset>
somehow the src attribute is not working.
ANY HELP!!!
 
Tilak Ochani
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tiles doenst work this way with frames.

Use <tiles:getAsString name="footer"/> instead of <tiles:insert attribute="footer" />.

Hope it works for you...


Example

<frame name="header" marginwidth="0" marginheight="0" scrolling="yes" noresize src= "<%=request.getContextPath()%><tiles:getAsString name="header"/>" ></frame>
<frame name="body" marginwidth="0" marginheight="0" scrolling="yes" noresize src="<%=decodeBody%>" ></frame>
<frame name="footer" marginwidth="0" marginheight="0" scrolling="no" noresize src="<%=request.getContextPath()%><tiles:getAsString name="footer"/>" ></frame>
 
rrr rr
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using tiles for desining the frontend of a webapplication. I have designed the layout which consists of title, header, body and footer. If I link a Single JSP page to the layout, it works fine. But the problem comes if I link a JSP page which uses FRAMESET tags. The following below is the file that I am linking to my layout.
-------------------

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<frameset rows="*" cols="217,*" framespacing="0" frameborder="NO" border="0">
<frame src="login.jsp" name="leftFrame" scrolling="NO" noresize>
<frame src="content.jsp" name="mainFrame">
</frameset>
----------------------

Could any body tell me how should I avoid the problem? Any possible hints/sample code is very much appreciated.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic