views:

75

answers:

2

Hello everyone ! I'm a newbie in JSF, facelet, richfaces... and I understood managed beans, methods called within JSF components However, I wanted to use facelets template with the ui:composition, ui:define, like master pages in asp.net

But I have an action that's meant to be called in a masterpage component... and I keep having the same error :

javax.servlet.ServletException: #{connectionMB.logOut}: javax.el.MethodNotFoundException: /masterPage.html @134,65 action="#{connectionMB.logOut}": Method not found: ConnectionBean

because the component is on the template page masterPage.html :

<jsf:commandLink id="link" action="#{connectionMB.logOut}" >Log Out</jsf:commandLink>

and the user action comes from other html pages which begin with :

the pages are treated server side, apache mixes the masterPages elements with the content of other pages... but how I am supposed to make an action called on a component's masterPage work for any pages ?

in my faces-config I tried lots of things :

<navigation-rule>
<from-view-id>/MySiteName/*</from-view-id>
<navigation-case>
        <from-action>#{connectionMB.logOut}</from-action>

or

<from-view-id>*</from-view-id>

or

<from-view-id>/masterPage.html</from-view-id>

none of this works...

if someone got a clue... thank you so much !

+1  A: 

Your problem is (currently) not in the navigation cases. For them - you can totally omit the <from-view-id>.

The problem is that your ConnectionBean does not have a public String logOut() method (it can be void as well).

Bozho
no of course I have a method of that king in ConnectionBean...
Yaelle
well, it seems you didn't ;) be sure to mark an answer as accepted if it helped
Bozho
A: 

ok that was entirely my fault. You can of course call a method from a master page without even specifying some navigation-rule. My project had some errors, and so didn't compile the last things I developed. that's all ... thank you anyway !

Yaelle