Well sort of...
The form has rendered, but page doesnt look like mine, total stylesheet is
gone off the wind.
I have few links in my header.jsp. On click , i need to reload the header,
menu and the contents. Basically redraw the whole page. So i make call tol
my action which calls the definition.

What is the reason for the following:

in my layout.jsp, if i use tiles:getAsString to render my content jsp which
has form attributes defined, returns null form object.

in the same layout, if i use tiles:getAsString to render a content jsp which
is just plain text, content is loaded perfectly in the iframe.

Is there any particular scenario in which we have to use tiles:getAsString
or tiles:insert? what is the difference?

Please shed some light. I am totally running out of options here.

my layout.jsp snippet looks like this:

<tr>
<td valign=top style="padding-right: 0px;border:none;border:none">
<tiles:insert name="header"/></td>
</tr>
<tr>
<td style="padding-right: 0px;border:none">
<!-- Centre of the table -->
<table width="100%" cellpadding="0" style="padding-right: 0px;margin: 0px;">
<tr>
<td width="11%" valign="top" style="padding-right: 0px;border:none">
<table width=100 height=500 cellpadding="0" style="margin: 1px;margin:
0px;">
<tr><td style="padding-right: 0px;border:none" valign="top" align="left"
style="text-align: left;">
<div id="cont-left-menu">
<tiles:insert name="menu"/></div>
</td></tr>
</table>
</td>
<td valign="top" align="left" width="89%" style="padding-right:
0px;border:none">
<table width="100%" height=100%  cellpadding="0" style="padding-right:
0px;margin: 1px;margin: 0px;">
<tr>
<td width="100%" valign="top" bgcolor="lightblue" style="padding-right:
0px;border:none">

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


Thanks

Nags.



newton.dave wrote:
> 
> Does it work outside of an iframe?
> 
> I mean, if you're going through a Struts request cycle, and your action
> doesn't do anything weird with the form before rendering, I'm not sure why
> a
> tiles:insert wouldn't work as expected--I do it all the time in my old S1
> apps, although I suppose I could be forgetting something.
> 
> d.
> 
> --- NagsNags <[EMAIL PROTECTED]> wrote:
> 
>> 
>> Hi,
>> 
>> my strutus-config entry is 
>> <action path="/contactHr"
>>              type="com.eurobenefits.mybenefits.view.actions.ContactHrAction"
>>              name="contactHrForm"
>>              scope="request"
>>              validate="false">
>>              <forward name="contactHrNew" path="contactHrNewDef" />
>>      </action>
>> 
>> my tiles-def entries are 
>> 
>>    <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>
>>  
>>    <definition name="contactHrNewDef" extends="contactHrBaseDef" >
>>      <put name="contents" value="/new/contactHrC.jsp" />
>>    </definition>
>> 
>> My header.jsp call looks like this:
>> 
>> <%String contacthrurl = request.getContextPath()+"/contactHr.do";%>
>> document.write(" '<%=contacthrurl% ' class='button blue' > Contact HR  |
>> "); 
>> 
>> my strutus action /contactHr.do is called first and from there it is
>> forwarded to the tiles-definition "contactHrNewDef" which extends
>> "contactHrBaseDef" and calls the jsp "/new/contactHrC.jsp".
>> 
>> What am I doing wrong here? Please let me know your views.Happy to
>> provide
>> any details you need.
>> 
>> Thanks
>> Nags.
>> 
>> 
>> NagsNags wrote:
>> > 
>> > Hi,
>> > 
>> > I am new to using struts tiles. we have started a project which uses
>> > struts tiles heavily.
>> > 
>> > My code is like this to load the contents in an iframe.
>> > 
>> > <iframe name="mainWindow" id="bodyframe" width="100%"
>> > src="<%=request.getContextPath()%><tiles:getAsString name='contents'/>"
>> > scrolling="no" marginwidth="0" marginheight="0" frameborder="0"
>> vspace="0"
>> > hspace="0" style="overflow:visible; width:100%; display:none"></iframe>
>> > 
>> > With this code, I was loosing the form attributes whenever I try to
>> render
>> > a page with form variables. Plain text pages renders properly.
>> > DynaActionForm object itself was set to null if I use this.
>> > 
>> > So I tried using tiles:insert inside iframe like this,
>> > 
>> > <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>
>> > 
>> > Now the actual content's source code is getting inserted into src=" "
>> and
>> > the page is not rendered.
>> > 
>> > I am not sure as to what is wrong in the above.
>> > 
>> > Please help and it is very urgent. Your help in this regard is much
>> > appreciated.
>> > 
>> > Thanks
>> > Nags.
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/tiles%3Ainsert-instead-of-tiles%3AgetAsString%28%29-creates-problems.-tp14259147p14264496.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/tiles%3Ainsert-instead-of-tiles%3AgetAsString%28%29-creates-problems.-tp14259147p14265523.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to