<%-- starraLayout.jsp
2007-01-11 RJS. New.
--%>
<%@ include file="/jspf/common/taglibs.jsp" %>
<%@ include file="/jspf/common/messages.jsp" %>
<%-- Layout Tiles
This layout create a html page with <header> and <body> tags. It render
a header, left menu, body and footer tile.
@param title String use in page title
@param header: Header tile (jsp url or definition name)
@param menuBar: Menu Bar
@param body: Body
@param footer: Footer
--%>
<f:view>
<html>
<head>
<link href="<h:outputText
value="#{facesContext.externalContext.requestContextPath}"/><h:outputText
value="#{msg['style.base']}"/>"
rel="stylesheet"
type="text/css"/>
<title><tiles:attribute flush="false" name="title"/></title>
</head>
<body background="<h:outputText
value="#{facesContext.externalContext.requestContextPath}"/><h:outputText
value="#{msg['img.background.app']}"/>"/>
<table border="0" cellspacing="5" width="100%" >
<tr>
<td colspan="2"><tiles:attribute flush="false" name="header"/></td>
</tr>
<tr>
<td valign="top" width="13%">
<tiles:attribute flush="false" name="menuBar"/>
</td>
<td valign="top">
<tiles:attribute flush="false" name="body"/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<tiles:attribute flush="false" name="info"/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<tiles:attribute flush="false" name="footer"/>
</td>
</tr>
</table>
</body>
</html>
</f:view>
Here you are. I am using Tiles from "shale-framework-1.1.0-SNAPSHOT/lib" (Shale
20070207).
Dick
-----Original Message-----
From: JS Portal support team [mailto:[EMAIL PROTECTED]
Sent: Fri 2/9/2007 7:07 PM
To: [email protected]
Cc:
Subject: RE: tiles integration error
This is usefull. Adding Greg's web.xml tags solved my initial problem,
which leads me to believe that I'm using a newer version of tiles than
Dick is using. Still, I am very curious to see Dick's
/tiles/layouts/starraLayout.jsp (or a little part of it to see how you
define the tiles tags). I guess I'm still struggling a bit with the
entire architecture of tiles as I'm confused by the different versions.
Also, I can't seem to download the latest Tiles from
http://www.apache.org/dyn/closer.cgi/tiles/binaries/tiles-2.0.0-bin.zip
nor can I subscribe to the [EMAIL PROTECTED] mailing list. Does
anyone know why?
Thanks a lot for your persistent help.
Regards,
Joost
-----Original Message-----
From: Dick Starr [mailto:[EMAIL PROTECTED]
Sent: Friday, February 09, 2007 4:14 AM
To: [email protected]; [email protected]
Subject: RE: tiles integration error
I am now using yesterday's snapshot.
My web.xml has:
<!-- Tiles -->
<context-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/conf/tiles.xml</param-value>
</context-param>
<listener>
<listener-class>
org.apache.tiles.listener.TilesListener
</listener-class>
</listener>
and my faces-config.xml has:
<!-- Tiles Integration -->
<application>
<view-handler>
org.apache.shale.tiles.TilesViewHandler
</view-handler>
</application>
and my tiles.xml has:
<!-- Site master definition -->
<definition name="/siteMainLayout"
path="/tiles/layouts/starraLayout.jsp">
<put name="title" value="/tiles/common/title.jsp"/>
<put name="header" value="/tiles/common/header.jsp"/>
<put name="menuBar" value="/tiles/common/menuBar.jsp"/>
<put name="body" value=""/>
<put name="info" value="/tiles/common/info.jsp"/>
<put name="footer" value="/tiles/common/footer.jsp"/>
</definition>
<definition name="/systemLogoff"
extends="/siteMainLayout">
<put name="body"
type="template"
value="/jsp/system/logoff.jsp"/>
</definition>
where logoff.jsp is:
<%@ include file="/jspf/common/taglibs.jsp" %>
<%@ include file="/jspf/common/messages.jsp" %>
<h:form id="logoff">
<h:panelGrid
border="1"
cellspacing="2"
cellpadding="2"
columns="1"
footerClass="starraPanelGridFooter"
headerClass="starraPanelGridHeader"
styleClass="starraBody">
<f:facet name="header">
<h:outputText value="#{msg['class.system.Logoff']}"/>
</f:facet>
<h:panelGroup>
<h:outputFormat value="#{msg['app.logoff.user']}">
<f:param value="#{stateBean.logonName}"/>
</h:outputFormat>
</h:panelGroup>
<f:facet name="footer">
<h:panelGroup>
<h:commandButton action="#{systemLogon.logoff}"
value="#{msg['button.Yes']}"/>
<h:commandButton action="#{systemLogon.cancel}"
immediate="true"
value="#{msg['button.Cancel']}"/>
</h:panelGroup>
</f:facet>
</h:panelGrid>
</h:form>
Dick
-----Original Message-----
From: JS Portal Support [mailto:[EMAIL PROTECTED]
Sent: Thu 2/8/2007 5:01 AM
To: [email protected]
Cc:
Subject: RE: tiles integration error
Gotta love one of those days where you waste 6 hours just because you left
an old struts.jar in a commons folder
To my relieve the next seemingly unsolvable problem lined itself up ;-)
org.apache.tiles.FactoryNotFoundException: Can't get definitions factory
from context.
Seems to indicate that tiles definitions file is never loaded. I have
defined the following in my web.xml:
<context-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<!-- tried this as well
<context-param>
<param-name>org.apache.tiles.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
-->
And my tiles.xml:
<tiles-definitions>
<definition name="/mainLayout"
template="/jsp/tiles/layouts/loggedLayout.jsp">
<put name="top" value="/jsp/tiles/top.jsp"/>
<put name="nav" value="/jsp/tiles/nav.jsp"/>
<put name="content" value=""/>
<put name="bottom" value="/jsp/tiles/bottom.jsp"/>
</definition>
<definition name="/loggedLayout" extends="/mainLayout">
<put name="content" template="/jsp/dashboard_test.jsp"/>
</definition>
</tiles-definitions>
Am I missing anything?
Cheers,
Joost
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Thursday, February 08, 2007 1:56 PM
To: [email protected]
Subject: Re: tiles integration error
On 2/7/07, JS Portal Support <[EMAIL PROTECTED]> wrote:
>
> I cheered too soon ;-)
:-)
I have all the right jar's in place but can't figure out how to configure
> the lot. Maybe I'm missing something but I can't find any example with the
> shale 1.1.0 snapshot I just downloaded. The thread at [1] seems too old
> and
> the explanation at [2] seems to new. Where can I find a working example to
> work from?
>
> I guess most of my questions is in regard to configuring tiles, but since
> I'm relying on shale, I need to make sure I'm configuring the right
> version
> here.
There are a couple of pointers on the Shale wiki that might help[1].
Thanks,
> Joost
>
> [1] http://www.mail-archive.com/[email protected]/msg00774.html
> [2] http://tiles.apache.org/quickstart/index.html
Craig
[1] http://wiki.apache.org/shale/ShaleAndTiles
-----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
> McClanahan
> Sent: Thursday, February 08, 2007 6:19 AM
> To: [email protected]
> Subject: Re: tiles integration error
>
> On 2/7/07, Dick Starr <[EMAIL PROTECTED]> wrote:
> >
> > I use Shale/Tiles successfully with the nightly builds at
> > http://people.apache.org/builds/shale/nightly/ (I am currently using the
> > 01/29/07 version). I use the jars from
> > shale-framework-1.1.0-SNAPSHOT/lib.
>
>
> In particular, you need to use the snapshot of Tiles that is included with
> the framework builds for this to work. Because Tiles is still a moving
> target, we sync up on snapshots (such as the "2.0-r468346-SNAPSHOT"
> version
> that is currently specified in the shale-tiles POM).
>
> Dick
>
>
> Craig
>
>