I am not so sure that you should give up. I am using Tiles with JSF with almost 
the same configuration as yours and it works quite well. I see one problem with 
your  navigation: you are using wrong names of files. It should be *.jsp, not 
*.tiles. So it should look like that

<navigation-rule>
        <from-view-id>*</from-view-id>
        <navigation-case>
                <from-outcome>navEtablissement</from-outcome>
                <to-view-id>/etablissement.jsp</to-view-id>
        </navigation-case>
        
        <navigation-case>
                <from-outcome>navMairie</from-outcome>
                <to-view-id>/mairie.jsp</to-view-id>
        </navigation-case>
        
        <navigation-case>
                <from-outcome>navDeclaration</from-outcome>
                <to-view-id>/declaration.jsp</to-view-id>
        </navigation-case>
  </navigation-rule>


Pawel Koloszko

-----Original Message-----
From: CHAMBAZ Alexandre [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 16, 2006 2:00 PM
To: MyFaces Discussion
Subject: Re: JSF & Tiles Action Problem

Thanks for all Matthias and Alexandre,

Exactly what I was looking for. So it looks it would be hard to do what I'm 
looking for, I think I willl have to give up Tiles with JSF ;-(

Extract of the presentation:

Apache Tiles
Things that can go wrong

* Navigation rules are relative to the top viewId * Not the tile * Tool support 
is surprisingly thin * JSF backing beans can't see tiles



--- Matthias Wessendorf <[EMAIL PROTECTED]> a écrit :

> here goes the link
> 
>
http://developers.sun.com/learning/javaoneonline/2005/webtier/TS-7853.pdf
> 
> 
> 
> On 2/16/06, Alexandre Poitras
> <[EMAIL PROTECTED]> wrote:
> > There is a lot of issues when using Tiles in JSF
> since Tiles is not a
> > JSF component. Watch the "Extreme Reuse in
> JavaServer Faces
> > Technology" JavaOne 2005 presentation if you want
> to know what I'm
> > talking about. You should use Facelets or
> Shale-Clay instead.
> >
> > On 2/16/06, CHAMBAZ Alexandre
> <[EMAIL PROTECTED]> wrote:
> > > Thanks for you're help but still not working. I
> tried
> > > a lot of different combination of navigation
> rule but
> > > it's never working. My problme is not navigation
> but
> > > more in the action thing. I think I need to
> force JSF
> > > to send the action to a specific page, how can I
> do
> > > that?
> > >
> > > Here is my faces-config.xml:
> > > <navigation-rule>
> > >         <from-view-id>*</from-view-id>
> > >         <navigation-case>
> > >                
> <from-outcome>navEtablissement</from-outcome>
> > >                
> <to-view-id>/etablissement.tiles</to-view-id>
> > >         </navigation-case>
> > >
> > >         <navigation-case>
> > >                
> <from-outcome>navMairie</from-outcome>
> > >                
> <to-view-id>/mairie.tiles</to-view-id>
> > >         </navigation-case>
> > >
> > >         <navigation-case>
> > >                
> <from-outcome>navDeclaration</from-outcome>
> > >                
> <to-view-id>/declaration.tiles</to-view-id>
> > >         </navigation-case>
> > >   </navigation-rule>
> > >
> > > Here it's my command button in a jsf page of my tile(composed of 4 
> > > pages):
> > > <h:commandLink id="lkE" action="#{mairie.addE}"
> > > immediate="true">
> > >                         <h:outputText
> value="Add"/>
> > >         </h:commandLink>
> > >
> > > and here it's the method called of my managed
> bean
> > > used:
> > > public String addE() {
> > >         .....
> > >                 return "sucess";
> > >         }
> > >
> > >
> > >
> > >
> > >
> > > --- Matthias Wessendorf <[EMAIL PROTECTED]>
> a
> > > écrit :
> > >
> > > > fast shot,
> > > >
> > > > -suround your button w/ <h:form> -ensure that you are using 
> > > > *global* navigation
> like
> > > >     <navigation-rule>
> > > >         <from-view-id>*</from-view-id>
> > > >         <navigation-case>
> > > >            
> <from-outcome>nav_page1</from-outcome>
> > > >            
> <to-view-id>/page1.jsp</to-view-id>
> > > >         </navigation-case>
> > > >         <navigation-case>
> > > >            
> <from-outcome>nav_page2</from-outcome>
> > > >            
> <to-view-id>/page2.jsp</to-view-id>
> > > >         </navigation-case>
> > > >         <navigation-case>
> > > >            
> <from-outcome>nav_page3</from-outcome>
> > > >            
> <to-view-id>/non-tile.jsp</to-view-id>
> > > >         </navigation-case>
> > > >         <navigation-case>
> > > >            
> <from-outcome>nav_page4</from-outcome>
> > > >            
> <to-view-id>/page4.jsp</to-view-id>
> > > >         </navigation-case>
> > > >     </navigation-rule>
> > > >
> > > >
> > > > On 2/15/06, CHAMBAZ Alexandre
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Hi everybody,
> > > > >
> > > > > I'm develloping a JSF Site with Tiles (from
> > > > Struts)
> > > > > using   the Tomahawk (I'm new in JSF
> programming
> > > > >
> > > >
> > >
>
)org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl
> > > > > support. The tile thing is working well. But
> when
> > > > I'm
> > > > > doing action in a jsf (with a command
> button) it's
> > > > not
> > > > > working.
> > > > >
> > > > > Here what I've got:
> > > > >
> > > > > body.jsp : <h:commandButton value="add"
> > > > > action="#{bean.add}"/>
> > > > > this page works well alone adding an element
> to a
> > > > > table
> > > > >
> > > > > menu.jsp : a page with a tree2 object from
> > > > tomahawk
> > > > > working  well also
> > > > >
> > > > > but if I use a tile to structure my design
> with
> > > > the
> > > > > tomahawk support, the action is not executed
> so
> > > > nothin
> > > > > is add.
> > > > >
> > > > > Here is my tile definition:
> > > > > <definition name="main.tiles"
> > > > extends="main.layout" >
> > > > >         <put name="body"
> value="/pages/body.jsp"
> > > > />
> > > > >         <put name="menu"
> value="/pages/menu.jsp"
> > > > />
> > > > >     </definition>
> > > > >
> > > > > Is there someone who could help me? is this
> had
> > > > > already be solved?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
>
___________________________________________________________________________
> > > > > Nouveau : téléphonez moins cher avec Yahoo!
> > > > Messenger ! Découvez les tarifs exceptionnels
> pour
> > > > appeler la France et l'international.
> > > > > Téléchargez sur
> http://fr.messenger.yahoo.com
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > > Zülpicher Wall 12, 239
> > > > 50674 Köln
> > > > http://www.wessendorf.net
> > > > mwessendorf-at-gmail-dot-com
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> 
=== message truncated ===



        

        
                
___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

Reply via email to