You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stand Trooper <st...@gmail.com> on 2005/11/28 19:52:51 UTC

nesting tiles and MyFaces

This isn't necessarily a MyFaces question, it's probably more of a
tiles integration with JSF, but I'm going for it anyway.

I have a base implementation of a jsf index page which loads a tiles
definition... no biggie, that works just fine.

The issue comes up with one of my definitions having a tiles def in it.

e.g.
indexInclude.jsp
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://jakarta.apache.org/tiles" prefix="tiles" %>

<f:view>
     <f:subview id="mainContent">
          <tiles:insert attribute="mainContent"/>
     </f:subview>
</f:view>

//mainContent in my tiles definitions is mapped to nothing, but my
TilesServletController sends it to a predefined page (search.jsp)

search.jsp
<%@ taglib uri="http://jakarta.apache.org/tiles" prefix="tiles" %>

<tiles:insert definition="propertySearch" flush="false"/>

I have propertySearch to insert two attributes.

I've tried wrapping the insert definition on search.jsp with a facet,
a view and subview, a view and facet and subview.  Nothing seems to
keep it from asking me
java.lang.IllegalStateException: parent is null?

if I remove the tiles:insert and replace it with only text, it seems
to work just fine (with a subview, facet, view or anycombo thereof.

I did not find this type of question asked in the archives, but I'll
concede that my archive search probably wasn't exceptional.

any thoughts,

thx,

timo

Re: nesting tiles and MyFaces

Posted by Stand Trooper <st...@gmail.com>.
I read through the usages in the demos, but didn't quite pick up my
issue... hasn't been a great day.... but just so you're not displaced
about not getting to answer my first question... here's another
related question.

in my TilesController, I want to take the faces navigation and set a
specific page in the mainContent portion.

e.g. when the submitSearch (from my AbstractViewController impl)
returns (e.g. success, failure String) I want my TilesController to
say

if (success) {
     putAttribute("mainContent", "success.jsp");
}

thoughts on this?

thx,

timo

On 11/28/05, Matthias Wessendorf <mw...@gmail.com> wrote:
> Fine! :)
>
> However, there is a sample tiles_myfaces application inside of
> MyFaces, which also demos the *useage* of nested tiles.
>
> -Matthias

Re: nesting tiles and MyFaces

Posted by Matthias Wessendorf <mw...@gmail.com>.
Fine! :)

However, there is a sample tiles_myfaces application inside of
MyFaces, which also demos the *useage* of nested tiles.

-Matthias

On 11/28/05, Stand Trooper <st...@gmail.com> wrote:
> ok, My bad!  I wasn't thinking clearly or whatever, found my stupid mistake
>
> My mistake was my <tiles:insert definition=""/> was wrapped in subview
> components on the nested page.
>
> nevermind!
>
>
> thx,
>
> timo
>


--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com

Re: nesting tiles and MyFaces

Posted by Stand Trooper <st...@gmail.com>.
ok, My bad!  I wasn't thinking clearly or whatever, found my stupid mistake

My mistake was my <tiles:insert definition=""/> was wrapped in subview
components on the nested page.

nevermind!


thx,

timo