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:     user@shale.apache.org
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: user@shale.apache.org
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/user@shale.apache.org/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: user@shale.apache.org
> 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
>
>




Reply via email to