Title: 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:  [EMAIL PROTECTED]
ACCESSDATA
Moving Your Business from Point A to Point e.SM
http://www.accessdc.com/

-----Original Message-----
From: Nik Malenovic [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 8:00 PM
To: [EMAIL PROTECTED]
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 <mailto:nmalenovi[EMAIL PROTECTED]>

Reply via email to