You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Arash Bijanzadeh <ar...@gmail.com> on 2005/07/29 11:09:02 UTC

Tiles status in the myfaces

Hi,
I was playing with tiles in myfaces last night and faced a lot of 
difficulties which in my opinion makes it nit suitable for a production 
environment. First of all i want to ask if it is testing or something or a 
stable release?

Second i wanted to discuss my points maybe there is some points wich I 
missed. Here is me template wich tries to resemble the myfaces-example in 
the tiles:
<%@ 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 uri="http://myfaces.apache.org/extensions" prefix="x"%>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="RTL">
<%@include file="/inc/head.inc"%>
<f:loadBundle basename="
org.apache.myfaces.examples.resource.example_messages" 
var="example_messages"/>
<f:view>
<body>
<x:panelLayout id="page" layout="#{globalOptions.pageLayout}"
styleClass="pageLayout"
headerClass="pageHeader"
navigationClass="pageNavigation"
bodyClass="pageBody"
footerClass="pageFooter" >

<f:facet name="header">
<f:subview id="header">
<tiles:insert attribute="menu" flush="false" />
</f:subview>
</f:facet>
<f:facet name="navigation">
<f:subview id="menu">
<tiles:insert attribute="leftMenu" flush="false" />
</f:subview>
</f:facet>
<f:facet name="body">
<f:subview id="body">
<tiles:insert attribute="body" flush="false"/>
</f:subview>
</f:facet>
<f:facet name="footer">
<f:subview id="footer">
<f:facet name="footer1">
<tiles:insert attribute="footer" flush="false" />
</f:facet>
</f:subview>
</f:facet>
</x:panelLayout>
</body>
</f:view>
</html>

major issues is:
1- using the <f:view> in the inserted pages leeds me to a blank page without 
a clue about what had happened. Because i inserted tem inside a subview, I 
think it is reasonable to use a view tag at the beginning.
2- giving an id in the <h:groupPanel> in the inserted pages again leed to 
blank page stragely.

I can provide full suorce of ehst i created for testing.

Regards
Arash

-- 
Abandon the search for Truth; settle for a good fantasy.

Re: Tiles status in the myfaces

Posted by Arash Bijanzadeh <ar...@gmail.com>.
On 7/29/05, Martin Marinschek <ma...@gmail.com> wrote:
> 
> as to 1: that is perfectly alright, f:view can only be set once per 
> page... even though an error message would be appropriate - fancy doing a 
> patch?


I love it. But I am not sure I can do it! ;) 

as to 2: I don't understand what would cause such behaviour. can you post 
> your subview code?


I couldn't get it correctly last night. The case is with duplicate id. When 
I have a dulicate id in the inserted page tiles ignores the part and I got a 
blank section instead of inserted tile

Regards,
Arash

> regards,
> 
> Martin
> 
> 
> 
> On 7/29/05, Arash Bijanzadeh <ar...@gmail.com> wrote:
> > 
> > Hi,
> > I was playing with tiles in myfaces last night and faced a lot of 
> > difficulties which in my opinion makes it nit suitable for a production 
> > environment. First of all i want to ask if it is testing or something or a 
> > stable release?
> > 
> > Second i wanted to discuss my points maybe there is some points wich I 
> > missed. Here is me template wich tries to resemble the myfaces-example in 
> > the tiles:
> > <%@ 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 uri="http://myfaces.apache.org/extensions" prefix="x"%>
> > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"
> > %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > <html dir="RTL">
> > <%@include file="/inc/head.inc"%>
> > <f:loadBundle basename="
> > org.apache.myfaces.examples.resource.example_messages" 
> > var="example_messages"/>
> > <f:view>
> > <body>
> > <x:panelLayout id="page" layout="#{globalOptions.pageLayout}"
> > styleClass="pageLayout"
> > headerClass="pageHeader"
> > navigationClass="pageNavigation"
> > bodyClass="pageBody"
> > footerClass="pageFooter" >
> > 
> > <f:facet name="header">
> > <f:subview id="header">
> > <tiles:insert attribute="menu" flush="false" />
> > </f:subview>
> > </f:facet>
> > <f:facet name="navigation">
> > <f:subview id="menu">
> > <tiles:insert attribute="leftMenu" flush="false" />
> > </f:subview>
> > </f:facet>
> > <f:facet name="body">
> > <f:subview id="body">
> > <tiles:insert attribute="body" flush="false"/>
> > </f:subview>
> > </f:facet>
> > <f:facet name="footer">
> > <f:subview id="footer">
> > <f:facet name="footer1">
> > <tiles:insert attribute="footer" flush="false" />
> > </f:facet>
> > </f:subview>
> > </f:facet>
> > </x:panelLayout>
> > </body>
> > </f:view>
> > </html>
> > 
> > major issues is:
> > 1- using the <f:view> in the inserted pages leeds me to a blank page 
> > without a clue about what had happened. Because i inserted tem inside a 
> > subview, I think it is reasonable to use a view tag at the beginning.
> > 2- giving an id in the <h:groupPanel> in the inserted pages again leed 
> > to blank page stragely.
> > 
> > I can provide full suorce of ehst i created for testing.
> > 
> > Regards
> > Arash
> > 
> > -- 
> > Abandon the search for Truth; settle for a good fantasy.
> > 
> 
> 


-- 
Abandon the search for Truth; settle for a good fantasy.

Re: Tiles status in the myfaces

Posted by Martin Marinschek <ma...@gmail.com>.
as to 1: that is perfectly alright, f:view can only be set once per page... 
even though an error message would be appropriate - fancy doing a patch?

as to 2: I don't understand what would cause such behaviour. can you post 
your subview code?

regards,

Martin



On 7/29/05, Arash Bijanzadeh <ar...@gmail.com> wrote:
> 
> Hi,
> I was playing with tiles in myfaces last night and faced a lot of 
> difficulties which in my opinion makes it nit suitable for a production 
> environment. First of all i want to ask if it is testing or something or a 
> stable release?
> 
> Second i wanted to discuss my points maybe there is some points wich I 
> missed. Here is me template wich tries to resemble the myfaces-example in 
> the tiles:
> <%@ 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 uri="http://myfaces.apache.org/extensions" prefix="x"%>
> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"
> %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html dir="RTL">
> <%@include file="/inc/head.inc"%>
> <f:loadBundle basename="
> org.apache.myfaces.examples.resource.example_messages" 
> var="example_messages"/>
> <f:view>
> <body>
> <x:panelLayout id="page" layout="#{globalOptions.pageLayout}"
> styleClass="pageLayout"
> headerClass="pageHeader"
> navigationClass="pageNavigation"
> bodyClass="pageBody"
> footerClass="pageFooter" >
> 
> <f:facet name="header">
> <f:subview id="header">
> <tiles:insert attribute="menu" flush="false" />
> </f:subview>
> </f:facet>
> <f:facet name="navigation">
> <f:subview id="menu">
> <tiles:insert attribute="leftMenu" flush="false" />
> </f:subview>
> </f:facet>
> <f:facet name="body">
> <f:subview id="body">
> <tiles:insert attribute="body" flush="false"/>
> </f:subview>
> </f:facet>
> <f:facet name="footer">
> <f:subview id="footer">
> <f:facet name="footer1">
> <tiles:insert attribute="footer" flush="false" />
> </f:facet>
> </f:subview>
> </f:facet>
> </x:panelLayout>
> </body>
> </f:view>
> </html>
> 
> major issues is:
> 1- using the <f:view> in the inserted pages leeds me to a blank page 
> without a clue about what had happened. Because i inserted tem inside a 
> subview, I think it is reasonable to use a view tag at the beginning.
> 2- giving an id in the <h:groupPanel> in the inserted pages again leed to 
> blank page stragely.
> 
> I can provide full suorce of ehst i created for testing.
> 
> Regards
> Arash
> 
> -- 
> Abandon the search for Truth; settle for a good fantasy.
>