I forgot: /organization/searchForm.jsp _does_ have a <%@ include file="../inc/taglibs.inc" %> at its top.
> -----Ursprüngliche Nachricht----- > Von: Olaf Bergner [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 22. Juni 2005 16:07 > An: MyFaces Discussion > Betreff: AW: [Tiles] Included tile not compiled (additional info) > > > Neal, > > thx for your prompt reply. Here's the - in my view - relevant snippet from > my topmost layout JSP: > > <%-- BEGIN MAIN CONTENT AREA --%> > <f:verbatim> > <div id="content"> > </f:verbatim> > <f:subview id="contentView"> > <tiles:insert attribute="content" flush="false" /> > </f:subview> > <f:verbatim> > </div> > </f:verbatim> > <%-- END MAIN CONTENT --%> > > Here's the tile /organization/searchForm.jsp which won't get compiled: > > <h:form id="organizationSearchForm"> > <f:verbatim> > <h1> > </f:verbatim> > <h:outputText value="#{msg['organization.headline.search']}" /> > <f:verbatim> > </h1> > </f:verbatim> > <h:panelGrid columns="3"> > <h:outputText > value="#{msg['organization.label.searchform.byCommonFields']}" /> > <h:inputText id="byCommonFieldsSearchString" styleClass="ewsgrey" > value="#{organizationSearch.searchString}" /> > <x:commandButton id="byCommonFieldsBtn" styleClass="ewsgrey" > action="#{organizationSearch.searchByCommonFields}" > image="#{msg['common.image.searchBtn']}" /> > [more rows] > </h:panelGrid> > </h:form> > > but this - /common/startPage.jsp will: > > <%@ include file="./inc/taglibs.inc" %> > <f:verbatim> > <h1> > </f:verbatim> > <h:outputText value="#{msg['common.headline.home']}" /> > <f:verbatim> > </h1> > </f:verbatim> > > As I said in my original post: If I swap the contents of > searchForm.jsp and > startPage.jsp I can see the correct output for searchForm.jsp, but now > startPage.jsp will be copied verbatim into the final HTML page. I think it > was Arthur C. Clarke who said: "Any sufficiently advanced > technology will be > indistinguishable from magic." Glad that I happen to see this in > my days ;-) > > Cheers, > > Olaf > > > -----Ursprüngliche Nachricht----- > > Von: Neal Haggard [mailto:[EMAIL PROTECTED] > > Gesendet: Mittwoch, 22. Juni 2005 15:27 > > An: MyFaces Discussion > > Betreff: RE: [Tiles] Included tile not compiled (additional info) > > > > > > Olaf, > > > > The reason the URL is not changing is you need to specify in > > your navigation rules that the case is a redirect by adding the > > <redirect /> tag to the rule. Something along the lines of: > > > > <navigation-rule> > > <from-view-id>*</from-view-id> > > > > <navigation-case> > > <from-outcome>organization-search</from-outcome> > > <to-view-id>/organization/searchForm.jsp</to-view-id> > > <redirect /> > > </navigation-case> > > </navigation-rule> > > > > As for your other issue (seeing the JSP source in the > > generated HTML) we have not had that issue, and we are using > > tiles to pull together the multiple layouts for our site. > > Perhaps could you give us a code snippet that shows where your > > 'content' tile is inserted in your layout tile definition and > > then some of your searchForm.jsf or something? > > > > Sorry you're having such problems and hope they clear up, > > > > Neal Haggard > > Senior Developer > > SAS Institute > > > > -----Original Message----- > > From: Olaf Bergner [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 22, 2005 9:06 AM > > To: MyFaces Discussion > > Subject: [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:[EMAIL PROTECTED] > > > Gesendet: Dienstag, 21. Juni 2005 13:35 > > > An: [email protected] > > > 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) > > > > > > > > > > > > > > >

