You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Assenza, Chris" <ca...@Accessdc.com> on 2001/07/31 15:04:27 UTC

RE: Wrong ordering of rendered html elements when using templates under WAS 3.5.x

You need to use flush="true" on your template:get tags. :) WebSphere needs
it's hand held to do the include properly. :-P
 
(ex. <template:get name="main" flush="true" /> )

-Chris

Christopher Assenza 
Phone:  412.201.6026 
Fax:     412.201.6060 
Email:  cassenza@accessdc.com 
ACCESSDATA 
Moving Your Business from Point A to Point e.SM 
http://www.accessdc.com/ <http://www.accessdc.com/>  

-----Original Message-----
From: Nik Malenovic [mailto:nmalenovic@msn.com]
Sent: Monday, July 30, 2001 8:00 PM
To: struts-user@jakarta.apache.org
Subject: Wrong ordering of rendered html elements when using templates under
WAS 3.5.x



Hello personable people, 

We've got a live one over here - using templates under WebSphere 3.5.4
(don't ask) with struts 1.0 (plus a fix or two that is required to get
struts functioning properly under WAS3.5.x) produces misordered rendered
html elements.


Here's what I mean: 

Actors: 
------- 
Home.jsp 
Home_content.jsp 
Home_template.jsp 

Home.jsp: 
--------- 
[<%@ taglibs here %> ] 
<!-- home.jsp:My Title --> 

<template:insert template="home_template.jsp"> 
  <template:put name="title" direct="true">My Title</template:put> 
  <template:put name="content" content="home_content.jsp" /> 
</template:insert> 

Home_content.jsp: 
------------------ 
[<%@ taglibs here %> ] 
<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  <tr> 
    <td>foo</td> 
  </tr> 
</table> 

Home_template.jsp 
------------------ 
[<%@ taglibs here %> ] 
<html:html locale="true"> 
  <head> 
    <title><template:get name="title" /> </title> 
  </head> 

  <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0"> 

    <table width="100%" border="0" cellspacing="0" cellpadding="0"
height="24"> 
      <tr> 
        SOME MORE WILD TEXT HERE 
      </tr> 
    </table> 

    <!-- begin content --> 
    <template:get name="content" /> 
    <!-- end content --> 
  </body> 
</html:html> 



Output of glorious home.jsp hosted by WAS3.5.x (notice out of order
rendering!): 
----------------------------------------------------------------------------
- 
<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  <tr> 
    <td>foo</td> 
  </tr> 
</table> 

<html lang="en"> 
  <head> 
    <title> 
      My Title 
   </title> 
  </head> 

  <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0"> 

    <table width="100%" border="0" cellspacing="0" cellpadding="0"
height="24"> 
      <tr> 
        SOME MORE WILD TEXT HERE 
      </tr> 
    </table> 

    <!-- begin content --> 
    
    <!-- end content --> 
  </body> 
</html> 




<!-- home.jsp:My Title --> 



See the problem? :-) I'd appreciate anyone with a clue to send me one. 


Thanks, 


Nik 
-- 
Nik Malenovic <  <ma...@msn.com> mailto:nmalenovic@msn.com>