Yes.

For some reason I get the feeling that the Backing Bean is never called and
I have no idea why. For instance, if I implement a simple
System.out.println("test"); in the Backing Bean method, it SHOULD produce
some console output but it doesnt.
But I can't find the problem.

I assume it is one of those tiny yet "stupid" newbie problems but I can't
wrap my brain around it...

Matt

Should I attach the entire .war to one of these mails so you can take a
closer look?


-----Original Message-----
From: Udo Schnurpfeil [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 13. September 2005 14:30
To: MyFaces Discussion
Subject: Re: [newbie] Navigation does not work

and you reload every time the 1st page before pressing the button?

Matthias Klein wrote:

>>1. remove "<from-view-id>/LODetails.jsp</from-view-id>" (is not needed 
>>for
> 
> this test)
> 
> I did that
> 
> 
>>2. set action="viewuserratings" directly, instead of the bean method
> 
> 
> I did that
> 
> 
>>3. check if the container really update your modified web-application 
>>(how
> 
> do you deploy?)
> 
> I deploy out of MyEclipse IDE 4. The console says that it does deploy 
> the .war
> 
> Unfortunately, none of the changes helped.
> Pressing the button does not help at all.
> 
> Matt
> 
> 
> 
> 
> Udo
> 
> Dexter Wong wrote:
> 
> 
>>Hi,
>>your sample worked for me. I am using
>>jboss 4.0.2
>>java 1.5.004
>>windows xp
>>
>>I make some changes
>>0. changed files from *.jsf to *.jsp
>>1. my config files looks like
>>
>>        <navigation-rule>
>>       <from-view-id>/LODetails.jsp</from-view-id>
>>       <navigation-case>
>>               <from-outcome>viewuserratings</from-outcome>
>>           <to-view-id>/LORatings.jsp</to-view-id>
>>       </navigation-case>
>>   </navigation-rule>   
>>
>>2. The LODetails.jsp is not using a resource file
>>
>>
>>
>>On 9/13/05, *Matthias Klein* <[EMAIL PROTECTED] 
>><mailto:[EMAIL PROTECTED]>> wrote:
>>
>>    Actually, I did both but it did not change anything.
>>
>>    Here the more complete excerpts from faces-config:
>>
>>            <navigation-rule>
>>            <from-view-id>/LODetails.jsf</from-view-id>
>>            <navigation-case>
>>                    <from-outcome>viewuserratings</from-outcome>
>>                <to-view-id>/LORatings.jsf</to-view-id>
>>            </navigation-case>
>>        </navigation-rule>
>>
>>    <managed-bean>
>>            <description>Backing-Bean for LODetails.</description>
>>            
>><managed-bean-name>LODetailsBackingBean</managed-bean-name>
>>
>>    <managed-bean-class>ca.gc.nrc.iit.toml.frontend.LODetailsBackingBean
>>    </manage
>>    d-bean-class>
>>            <managed-bean-scope>session</managed-bean-scope>
>>        </managed-bean>
>>
>>    Something like that I did.
>>    But still - pressing the button does not do anything at all
>>
>>    So I am wondering if I did something wrong or if that is a
>>    JSF/MyFaces-issue.
>>
>>    Thanks
>>
>>    Matt
>>
>>
>>    -----Original Message-----
>>    From: hicham abassi [mailto:[EMAIL PROTECTED]
>>    <mailto:[EMAIL PROTECTED]>]
>>    Sent: Dienstag, 13. September 2005 12:59
>>    To: MyFaces Discussion
>>    Subject: Re: [newbie] Navigation does not work
>>
>>    1/ it seems that yo don't declared your bean LODetailsBackingBean into
>>    faces-config.xml 2/ you don't declared a string outcome
>>    viewuserratings for
>>    view-id LODetails.jsf
>>
>>
>>
>>    2005/9/13, Matthias Klein <[EMAIL PROTECTED]
>>    <mailto:[EMAIL PROTECTED]>>:
>>     > I have started to create a simple MyFaces-App and encountered a
>>     > problem with the navigation:
>>     > Pressing a button does not do anything.
>>     >
>>     > Some code sniplets:
>>     >
>>     > -------------------------
>>     > Page1:
>>     >
>>     > <%@ page language="java" %>
>>     > <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %> <%@
>>    taglib
>>     > uri="http://java.sun.com/jsf/core <http://java.sun.com/jsf/core>"
>>    prefix="f" %> <f:loadBundle
>>     > basename="ca.gc.nrc.iit.toml.frontend.bundles.LODetails"
>>     > var="MessageBundle"/>
>>     >
>>     > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>>    <html>
>>     >         <body>
>>     >             <f:view>
>>     >                 <h:form id="LODetailsForm">
>>     >
>>     >                                 <table>
>>     >                                         <tbody>
>>     >                                                 [..]
>>     >
>>     >                                                         <td>
>>     >                                 <h:commandButton
> 
> id="viewuserratings"
> 
>>     > action="#{LODetailsBackingBean.viewUserRatings}"
>>     > value="#{MessageBundle.viewratingsbuttonlabel}" />
>>     >                                                         </td>
>>     >                                                 [..]
>>     >                 </h:form>
>>     >             </f:view>
>>     >         </body>
>>     > </html>
>>     >
>>     > -----------------------------------
>>     > Excerpt from faces-config:
>>     >
>>     >         <navigation-rule>
>>     >         <from-view-id>/LODetails.jsf</from-view-id>
>>     >         <navigation-case>
>>     >             <to-view-id>/LORatings.jsf</to-view-id>
>>     >         </navigation-case>
>>     >     </navigation-rule>
>>     >
>>     > -------------------------------------
>>     > Part of LODetailsBackingBean.java:
>>     >
>>     > public String viewUserRatings() {
>>     >                 return "viewuserratings";
>>     >         }
>>     >
>>     >
>>     > I deployed that on Tomcat 5.5.9 with J2SDK 1.5.0_04 through
>>    MyEclipse IDE
>>    4.
>>     > I see the page1 but when I press the button, nothing happens.
>>     >
>>     > Why?
>>     >
>>     > Thanks a lot
>>     >
>>     > Matt
>>     >
>>     >
>>
>>
>>    --
>>
>>    hicham ABASSI
>>    [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>
>>
> 
> --
> Dipl.-Math. Udo Schnurpfeil - Executive Officer - Atanion GmbH 
> Software Development - Bismarckstraße 13 - 26122 Oldenburg - Germany 
> phone +49 441 4082310 - mobile +49 174 9784746 - fax +49 441 4082333 
> mailto:[EMAIL PROTECTED] - http://www.atanion.com
> 
> 

--
Dipl.-Math. Udo Schnurpfeil - Executive Officer - Atanion GmbH Software
Development - Bismarckstraße 13 - 26122 Oldenburg - Germany phone +49 441
4082310 - mobile +49 174 9784746 - fax +49 441 4082333
mailto:[EMAIL PROTECTED] - http://www.atanion.com

Reply via email to