You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Olaf Bergner <Ol...@de.easynet.net> on 2005/06/22 15:06:04 UTC

[Tiles] Included tile not compiled (additional info)

Since nobody responded to my first post and sine further this problem is
starting to become a real showstopper potentially blocking our adoption of
JSF I try to give some further info, little as it may be.

I have a main navigation bar for switching between modules, registered as
global navigation rules. If I switch from /common/startPage.jsf[=tiles] to
/organization/searchForm.jsf by clicking on the navigation link
(h:commandLink) the URL in my browser remains unchanged, yet the
"sideActions" tile will be correctly inserted and transformed into HTML. The
"content" tile, though, will be inserted verbatim, i.e. I can see the JSP
source in the generated HTML. Only after a second click on the same link
does the URL change.

If I change back to /common/startPage.jsf I need two clicks to change the
browser URL, yet the "sideActions" as well as the "content" tile both will
be inserted and transformed correctly.

Since even after staring at the tiles-defs.xml for nearly a week without
noticing any structural differences between /common/startPage.tiles and
/organization/searchForm.tiles I strongly suspect that this is a bug in
MyFaces' tiles integration. Did anyone encounter a similar phenomenon and
maybe found a workaround for it?

Thx,

Olaf

> -----Ursprüngliche Nachricht-----
> Von: Olaf Bergner [mailto:Olaf.Bergner@de.easynet.net]
> Gesendet: Dienstag, 21. Juni 2005 13:35
> An: users@myfaces.apache.org
> Betreff: [Tiles] Included not compiled
>
>
> I just started using JSF, trying to get MyFaces' Tiles
> integration to work.
> So I created a layout page which uses tiles:insert to include the mainbar,
> the sidebar and the content pane. In my tiles definition file I
> have a base
> definition which all other definitions - two so far - extend.
>
> Here's my tiles definition file:
>
> <tiles-definitions>
>  <definition name="/ews.base" path="/template/layout.jsp" id="basePage">
>   <put name="mainNavigation" value="/common/mainNavigation.jsp"
> type="page"/>
>   <put name="sideActions" value="/common/sideActions.jsp" type="page"/>
>   <put name="content" value="/common/empty.jsp" type="page"/>
>  </definition>
>  <definition name="/common/startPage.tiles" extends="/ews.base"
> id="startPage">
>   <put name="content" value="/startPage.jsp" type="page"/>
>  </definition>
>  <definition name="/organization/searchForm.tiles" extends="/ews.base"
> id="organizationSearchForm">
>   <put name="content" value="/organization/searchForm.jsp" type="page"/>
>  </definition>
> </tiles-definitions>
>
> A <c:redirect url="common/startPage.jsf"/> will produce the
> desired effect,
> i.e. the start page is composed correctly and I can see the message
> startPage.jsp produces via <h:outputText/>.
>
> And here's the catch: if I do a <c:redirect
> url="organization/searchForm.jsf"/> I get a page with
> mainNavigation.jsp and
> sideActions.jsp correctly included and translated into HTML, yet
> the content
> of organization/searchForm.jsp is copied _verbatim_ into the HTML
> page. This
> means that I can see the JSP code from organization/searchForm.jsp in the
> generated page's source code.
>
> I started playing around with the contents of startPage.jsp and
> organization/searchForm.jsp and ended up swapping it, i.e I copied
> startPage.jsp's JSP code into organization/searchForm.jsp and
> vice versa. Lo
> and behold: I can see my organizationSearchForm on the start page, and
> organization/searchForm.jsp is still copied verbatim into the
> generated HTML
> output. So the problem _seems_ to be the tiles definition
> /organization/searchForm.tiles itself and _not_ the JSP content in
> organization/searchForm.jsp.
>
> So could anyone give me a clue what is going on here since I am
> on the verge
> of throwing up after staring at this phenomenon for the last four
> days? I am
> using myfaces-1.0.9 in JBoss 4.0.2 under JDK 1.4.2_08 and any
> help would be
> _greatly_ appreciated.
>
> Cheers,
>
> Olaf
> --------------------------------------------
> Easynet GmbH (http://www.de.easynet.net)
> Olaf Bergner, System Integrations
> Harburger Schlossstrasse 1, D-21079 Hamburg
> fon: +49-40-77175-434, fax: +49-40-77175-519
> # Easynet is part of the easynet group plc (www.Easynetgroup.net)
>
>
>