Hello,

The sample about myfaces/tiles is good but it doesn't contain some jsp
content with form.
I found a strange bug. I need your validation about well using Tiles
with MyFaces.

/template/template1.jsp
----------------------------------
<%@ page session="false"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"; %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1" />
  <title></title>
  <link rel="stylesheet" type="text/css" href="css/default.css" />
</head>
<f:view>
<body>
                        <f:subview id="header">
                                <tiles:insert attribute="header" flush="false"/>
                </f:subview>
                        <f:subview id="menu">
                                <tiles:insert attribute="menu" flush="false" />
                </f:subview>
                <f:subview id="content">
                        <tiles:insert attribute="body" flush="false"/>
                </f:subview>
</body>
</f:view>
</html>

/WEB-INF/tiles.xml
-----------------------------
<tiles-definitions>
    <definition name="layout.example" path="/template/template.jsp" >
        <put name="header" value="/common/header.jsp" />
        <put name="menu" value="/common/navigation.jsp" />
    </definition>
 <definition name="/formContact.tiles" extends="layout.example" >
        <put name="body" value="/formContact.jsp" />
    </definition>
....
</tiles-definitions>


/formContact.jsp
-----------------------
<!-- If i use here <f:view> , my commandButton does'nt work why ?
 what's the good way to declare my jsp with or without <f:view> ?????
-->
<h:form>
<h:input ....>
<h:commandButton actionListener="....."/>

</h:form>



Thanks







--

hicham ABASSI
[EMAIL PROTECTED]

Reply via email to