You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Anton Gavazuk <an...@gmail.com> on 2008/07/22 09:37:07 UTC

[TOMAHAWK][MYFACES1.2][TILES] Strange behaviour of html

Hi all,

my env:
myfaces core and impl - latest build 1.2.4
tiles - 2.0.5
tomahawk - last build for 12 branch

now see very strange behaviour with page layout:

tiles base page for layout defined like this:

<code>
<%@ page contentType="text/html;charset=UTF-8" language="java"
pageEncoding="UTF-8" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<html>
<f:view>
	 <head>
		  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		  <link rel="stylesheet" href="css/blueprint/screen.css"
type="text/css" media="screen, projection">
		  <link rel="stylesheet" href="css/blueprint/print.css"
type="text/css" media="print">
		  <!--[if IE]><link rel="stylesheet" href="css/blueprint/ie.css"
type="text/css" media="screen, projection"><![endif]-->
	 </head>
	 <body>
	 <div id="root_container" class="container showgrid">
		  <tiles:insertAttribute name="test_page" flush="false"/>
	 </div>
	 </body>
</f:view>
</html>
</code>

is being processed in such html:
<code>
	 <head>
		  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		  <link rel="stylesheet" href="css/blueprint/screen.css"
type="text/css" media="screen, projection">
		  <link rel="stylesheet" href="css/blueprint/print.css"
type="text/css" media="print">
		  <!--[if IE]><link rel="stylesheet" href="css/blueprint/ie.css"
type="text/css" media="screen, projection"><![endif]-->
	 </head>
	 <body>
	 <div id="root_container" class="container showgrid">

		  Empty page
	 </div>
	 </body>



<html>

</html>
</code>

please notice, that I didnt change layout of html result.

I put the same content in simple jsf page (without tiles):

<code>
<%@ page contentType="text/html;charset=UTF-8" language="java"
pageEncoding="UTF-8" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<html>
<f:view>
	 <head>
		  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		  <link rel="stylesheet" href="css/blueprint/screen.css"
type="text/css" media="screen, projection">
		  <link rel="stylesheet" href="css/blueprint/print.css"
type="text/css" media="print">
		  <!--[if IE]><link rel="stylesheet" href="css/blueprint/ie.css"
type="text/css" media="screen, projection"><![endif]-->
	 </head>
	 <body>
	 <div id="root_container" class="container showgrid">
		  <h:outputText value="Ouytewtsdfsd"/>
	 </div>
	 </body>
</f:view>
</html>
</code>

and it is being rendered as :
<code>


<html>

	 <head>
		  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		  <link rel="stylesheet" href="css/blueprint/screen.css"
type="text/css" media="screen, projection">
		  <link rel="stylesheet" href="css/blueprint/print.css"
type="text/css" media="print">
		  <!--[if IE]><link rel="stylesheet" href="css/blueprint/ie.css"
type="text/css" media="screen, projection"><![endif]-->
	 </head>

	 <body>
	 <div id="root_container" class="container showgrid">
		  Ouytewtsdfsd
	 </div>
	 </body>

</html>
</code>

and the stranges thing here is css style has not been applied to page
(simple jsf case)
I only see the output of h:output component.
In tiles case the style is applied to the page, but for some reason
<html> tags dont have content.

What is wrong? Is this problem in latest myfaces builds?