You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Larson, Kirk" <Ki...@pearson.com> on 2005/08/19 04:48:42 UTC
MyFaces tiles problem
I deployed the "myfaces-tiles-example.war" example application that is
included in the MyFaces distribution. While experimenting with this
application, I attempted to reorganize the location of some of the JSP
files. Basically I wanted to be able to separate the pages into several
folders according to functionality. I moved one sample page into a
sub-folder, and I performed the following changes to the example
application...
1) created a "pages" folder within the root web context
2) Moved the "pages2.jsp" file to the "pages" folder
3) Modified the "pages2" navigation rule in the
"tiles-faces-config.xml".
<navigation-rule>
<from-view-id>/pages/page2.jsp</from-view-id>
<navigation-case>
<from-outcome>back</from-outcome>
<to-view-id>/page1.jsp</to-view-id>
</navigation-case>
</navigation-rule>
4) Modified the "pages2" tiles definition in the "tiles.xml" file.
<definition name="/pages/page2.tiles" extends="layout.example" >
<put name="body" value="/pages/page2.jsp" />
</definition>
5) I left the "navigation.jsp" file unchanged.
<h:commandLink action="nav_page2">
<h:outputText value="Page2" />
</h:commandLink>
The first time I navigated to "nav_page2" from the the "navigation.jsp"
page, the page seemed to display fine. However, the next time I tried to
navigate to the page (by clicking on the "Page2" link in the navigation
page) the page displayed with a really strange format. The raw content of
the page was displayed, but the CSS and div tags seemed to have been
ignored.
Has anyone successfully used the tiles integration with pages that are not
in the root content? Can anyone see something I am doing wrong?
Thanks much,
Kirk Larson
****************************************************************************
This email may contain confidential material.
If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************