The moose likes Struts and the fly likes using  tiles:insert in inframes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "using  tiles:insert in inframes" Watch "using  tiles:insert in inframes" New topic

using tiles:insert in inframes

sachin bhoite

Joined: Dec 10, 2007
Posts: 1
I need to call my jsp using tiles:insert rather than tiles:getAsString as I loose my dynactionform. I need to call it in the iframes. But the code gets replaced in the src attribute rather than redirecting the iframe to that jsp page. I have called it in the following way.

<iframe name="mainWindow" id="bodyframe" width="100%" src="<%=request.getContextPath()%><tiles:insert name='contents' />" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

This is called in the layout.jsp and in tghe tiles-def.xml I have the following definition

<definition name="contactHrBaseDef" path="/tiles/layout.jsp?PAGEID=CONTACTHR">
<put name="header" value="/tiles/header.jsp?PAGEID=USERHOME" />
<put name="menu" value="/tiles/menu.jsp?PAGEID=CONTACTHR" />
<put name="quickLinks" value="/tiles/quickLinks.jsp" />
<put name="bottomFooter" value="/tiles/bottomFooter.jsp" />

<!-- Definition for Contact HR -->
<definition name="contactHrNewDef" extends="contactHrBaseDef" >
<put name="contents" value="/new/contactHrC.jsp" />

By having all this the end result is in the iframe src attribute the contactHrC.jsp is getting written. Can anyone please suggest what ca be done. I can't use tiles:getAsString as the DynaActionForm gets set to null.
I agree. Here's the link:
subject: using tiles:insert in inframes
jQuery in Action, 3rd edition