Well, everything looks correct to me.  It might be that some exception somewhere is getting swallowed.  Do you have your logging set up?  Sometimes MyFaces swallows and logs certain exceptions that makes debugging difficult.  If not, you should make sure you have commons-logging.jar and log4j.jar in your WEB-INF/lib directory.  Then in WEB-INF/classes/log4j.properties you should have something like what I have below.  Otherwise, you can do the painful debugging of just stepping through the execution of NavigationHandlerImpl.handleNavigation(...).  That method should be getting "alero.altSearch" as the outcome and finding the next page and rendering it.  It appears that something must be going wrong in there.

I hope this helps you isolate your problem.

log4j.rootLogger=WARN, stdout

log4j.logger.org.apache.myfaces = INFO
log4j.logger.javax.faces = INFO
log4j.logger.org.ajax4jsf = INFO

#***************************************
# Appender "stdout"
#***************************************
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %c - %m%n


Adam Brod

Product Development Team


Jorge Vásquez <[EMAIL PROTECTED]>

07/26/2006 03:45 PM

Please respond to
"MyFaces Discussion" <[email protected]>

To
"'MyFaces Discussion'" <[email protected]>
cc
Subject
RE: Navigation problems with FACELETS





Hi Adam,
Thanks for your kind welcome to Facelets and your valuable help.
I currently have the messages in my page as follows:
 
<h:messages errorClass="errorMessage" globalOnly="false" showDetail="true" lang="en" />
 
There´s one important note and is that the action method is getting executed and as I remember the validation and conversion phases happen before so I guess that my problem is directly related with navigation or probably library stuff.
 
I also have the following lines in my web.xml:
 
<context-param>
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  <param-value>.xhtml</param-value>
 </context-param>
….
<context-param>
  <param-name>facelets.DEVELOPMENT</param-name>
  <param-value>true</param-value>
 </context-param>

<context-param>
  <param-name>com.sun.faces.validateXml</param-name>
  <param-value>true</param-value>
 </context-param>
 <context-param>
  <param-name>com.sun.faces.verifyObjects</param-name>
  <param-value>true</param-value>
 </context-param>
 
I have carefully followed all the guidelines suggested in the developer documentation.
 
My faces-config.xml rule is as follows:
 
<navigation-rule>
  <from-view-id>/pages/logon.xhtml</from-view-id>
  <navigation-case>
   <from-outcome>alero.altSearch</from-outcome>
   <to-view-id>/pages/tools/search/mainSearch_TRIAL.xhtml</to-view-id>
  </navigation-case>
 </navigation-rule>
 <navigation-rule>
 
I am 100% sure that the action of the managed bean is getting executed, I followed it until the last line and it returns the String:  “alero.altSearch”.  And it returns back to the login.xhtml.  By the way, all my files have the extension:  “*.xhtml” accordingly.  Something to note is that at first I was getting an exception related to some factory stuff, which I googled and found that it was related to the el-ri.jar library not being compatible with jdk1.4 and from a mailing list I saw that someone had solved a similar problem by getting Exadel´s corresponding library, and after using it the login page finally appeared but now I have this problem with the navigation.  
As you see I am feeling kind of blind here, do you have any ideas as to how to debug it?  
 
In case it helps this is my environment:
 
TOMCAT_VERSION:   5.0 (The one embedded with Exadel Studio PRO 3.5.1)
 
JDK:  j2sdk1.4.2_12
 
LIBRARIES:
-myfaces-api-1.1.4-SNAPSHOT.jar
-myfaces-impl-1.1.4-SNAPSHOT.jar
-commons-beanutils-1.7.0.jar
-commons-codec-1.3.jar
-commons-collections-3.1.jar
-commons-digester-1.6.jar
-commons-el-1.0.jar
-commons-fileupload-1.1.1.jar
-commons-lang-2.1.jar
-commons-logging-1.0.4.jar
-el-api.jar
-el-ri.jar
-jsf-facelets.jar
-log4j-1.2.13.jar
-tomahawk-1.1.5-SNAPSHOT.jar
-portlet.jar
-alerolib.jar
-ajaxanywhere-1.2-RC2.jar
 
 
Regards,
JV
 
 
 
 
 
 
 



De: Adam Brod [mailto:[EMAIL PROTECTED]
Enviado el:
miércoles, 26 de julio de 2006 13:18
Para:
MyFaces Discussion
Asunto:
Re: Navigation problems with FACELETS

 

Hi Jorge-


Welcome to Facelets!  I'm sure that we'll be able to get you through your current issue.


First, I would make sure that you have
<h:messages showDetail="true" /> defined on your login page.  There might be a validation/model update problem that isn't being displayed.

Secondly, I would make sure that you have the facelets.DEVELOPMENT parameter defined in your web.xml:

<
context-param>
   
<param-name>facelets.DEVELOPMENT</param-name>
   
<param-value>true</param-value>
 
</context-param>

Often that will ensure you get a good error message.


If those don't work, are you sure your action method is being invoked?  Perhaps you could send the details of your login page so we can ensure that everything looks okay.


I hope that helps.


Adam Brod

Product Development Team

Jorge Vásquez <[EMAIL PROTECTED]>

07/26/2006 02:07 PM


Please respond to
"MyFaces Discussion" <[email protected]>


To
<[email protected]>
cc
 
Subject
Navigation problems with FACELETS

 


   





Greetings to all,

Alter having many problems with JSP+JSF I decided to give it a try with Facelets.  Everything started fine, my login page appeared on screen and I was starting to get excited but unfortunately in our profession excitement doesn´t lasts much and I am getting problems with navigation where I get no message at all, no log, etc.  I followed the application in debug mode and after clicking the submit button it went to the corresponding action method in the managed bean and reached the end and returned the respective String which in the faces-config is mapped to another page but nothing happens and the same page is reloaded with no message at all.  Here I confess that I am completely lost, how can I debug this?  Has anyone had a similar problem with MyFaces+Facelets?  
Regards,

JV

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.
Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.


Reply via email to