This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Struts and the fly likes HELP with tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HELP with tiles" Watch "HELP with tiles" New topic
Author

HELP with tiles

Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
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

Joined: May 26, 2004
Posts: 4
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>


Tilak Ochani
rrr rr
Greenhorn

Joined: Oct 13, 2004
Posts: 1
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HELP with tiles