Seam, ICEfaces and navigation rules
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
Seam, ICEfaces and navigation rules  XML
Forum Index -> JBoss Seam Integration
Author Message
gector

Joined: 15/12/2006 00:00:00
Messages: 27
Offline


I have an action ejb that returns "success" after a successful login.
The problem is that return string is being ignored by my navigation-rules. I have tried putting them in faces-config.xml as well as a separate navigation.xml.

I had this working fine with Seam and MyFaces but, since I switched to ICEFaces this has been occurring.

The only way I get to the next page is by hard coding the page as the return string in the LoginAction code.

Does anyone out there know what would cause this?

TIA
philip.breau


Joined: 08/05/2006 00:00:00
Messages: 2691
Offline


Hi,

Could you post your navigation rule? Does it work without using a from-view-id? If this rule is supposed to apply to the root context / without an absolute url being displayed (as would happen when first forwarding from the root context), then you'll need to use a global navigation rule.

Thanks,
Philip

.
gector

Joined: 15/12/2006 00:00:00
Messages: 27
Offline


Hi Philip,

Here is my faces-config.xml:

Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
 
 <faces-config>
 	<navigation-rule>
 		<from-view-id>/userLogin.jspx</from-view-id>
 		<navigation-case>
 			<from-outcome>success</from-outcome>
 			<to-view-id>/styledTree.jspx</to-view-id>
 		</navigation-case>
 		<navigation-case>
 			<from-outcome>failure</from-outcome>
 			<to-view-id>/styledTree.jspx</to-view-id>
 		</navigation-case>
 	</navigation-rule>
 	
 	<!-- A phase listener is needed by all Seam applications -->
 
 	<lifecycle>
 		<phase-listener>
 			org.jboss.seam.jsf.SeamPhaseListener
 		</phase-listener>
 	</lifecycle>
 </faces-config>
 


It didn't work with or without from-view-id nor with or without redirect.
Both pages are at the root.
How do you create a global navigation rule?

Thanks.
philip.breau


Joined: 08/05/2006 00:00:00
Messages: 2691
Offline


Hi,

A global navigation rule is simply one without a <from-view-id> or <from-view-id>*</from-view-id>. Are you using .iface or .seam extensions? Try specifying those in your view id.

Thanks,
Philip

.
gector

Joined: 15/12/2006 00:00:00
Messages: 27
Offline


I tried using a global navigation rule as well as .seam and iface extensions, no luck.

I'm seeing this debug message though

Code:
 2006-12-27 13:30:42,193 DEBUG [com.icesoft.faces.context.BridgeFacesContext] Cannot find clientId login:userNamefrom facesMessages
 


Any ideas if that is normal?

Please take a look at my web.xml to see if anything looks wrong

web.xml:

Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 	<!-- Seam -->
 	<listener>
 		<listener-class>
 			org.jboss.seam.servlet.SeamListener
 		</listener-class>
 	</listener>
 
 	<filter>
 		<filter-name>Seam Exception Filter</filter-name>
 		<filter-class>
 			org.jboss.seam.servlet.SeamExceptionFilter
 		</filter-class>
 	</filter>
 
 	<filter-mapping>
 		<filter-name>Seam Exception Filter</filter-name>
 		<url-pattern>*.seam</url-pattern>
 	</filter-mapping>
 
 	<context-param>
 		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
 		<param-value>client</param-value>
 	</context-param>
 
 	<context-param>
 		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
 		<param-value>.iface</param-value>
 	</context-param>
 
 	<context-param>
 		<param-name>com.icesoft.faces.actionURLSuffix</param-name>
 		<param-value>.seam</param-value>
 	</context-param>
 
 	<context-param>
 		<param-name>com.icesoft.faces.synchronousUpdate</param-name>
 		<param-value>true</param-value>
 	</context-param>
 
 	<servlet>
 		<servlet-name>Faces Servlet</servlet-name>
 		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
 		<load-on-startup>1</load-on-startup>
 	</servlet>
 
 	<servlet>
 		<servlet-name>Blocking Servlet</servlet-name>
 		<servlet-class>
 			com.icesoft.faces.webapp.xmlhttp.BlockingServlet
 		</servlet-class>
 		<load-on-startup>1</load-on-startup>
 	</servlet>
 
 	<servlet>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<servlet-class>
 			com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet
 		</servlet-class>
 		<load-on-startup>1</load-on-startup>
 	</servlet>
 
 	<servlet-mapping>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<url-pattern>/xmlhttp/*</url-pattern>
 	</servlet-mapping>
 
 	<servlet-mapping>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<url-pattern>*.iface</url-pattern>
 	</servlet-mapping>
 	
 	<servlet-mapping>
 		<servlet-name>Blocking Servlet</servlet-name>
 		<url-pattern>/block/*</url-pattern>
 	</servlet-mapping>
 	
 	<servlet-mapping>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<url-pattern>*.seam</url-pattern>
 	</servlet-mapping>
 
 	<listener>
 		<listener-class>
 			org.apache.myfaces.webapp.StartupServletContextListener
 		</listener-class>
 	</listener>
 	<!-- Crystal Reports -->
 	<context-param>
 		<param-name>crystal_image_uri</param-name>
 		<param-value>crystalreportviewers</param-value>
 	</context-param>
 	<context-param>
 		<param-name>crystal_image_use_relative</param-name>
 		<param-value>webapp</param-value>
 	</context-param>
 
 </web-app>
 


Thanks.
philip.breau


Joined: 08/05/2006 00:00:00
Messages: 2691
Offline


Are you using the D2DSeamFaceletViewHandler set in the faces-config.xml?

Thanks,
Philip

.
gector

Joined: 15/12/2006 00:00:00
Messages: 27
Offline


No, I'm not using Facelets, however, I did find the problem after many painful hours.
I was using ice:commandButton instead of h:commandButton, silly me.
The ice button does not behave as all other buttons behave in that it simply clears the password field when you hit <enter> after typing the password.
I had to use the mouse button on the submit button to get it work properly.
I switched back to the h: button and now all is well.

Thanks anyhow.

JR
 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team