I am not getting any error in any log other than this one :

22:17:29,449 ERROR [org.apache.myfaces.util.LocaleUtils] Locale name
null or empty, ignoring

I was assuming that wouldn't be the one to blame. 

Other than that, neither the tomcat access log or the console show any
error at all.

I've attached the salient files from my portlet. Perhaps I've goofed
elsewhere?

Any insight greatly appreciated. 

Thanks

Todd


> -----Original Message-----
> From: Stan Silvert [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 27, 2006 1:45 PM
> To: MyFaces Discussion
> Subject: RE: Do Portlet Modes and JSF navigation work together?
> 
> Hi Todd,
> 
> I think you are missing something.  Navigation works fine, 
> but if there is some error then it will just go to the 
> default view.  Check your log for an error.  Note that 
> redirects won't work in portlets, so you will need to remove 
> any redirects.
> 
> Post the error if you got one.
> 
> Stan Silvert
> JBoss, Inc.
> [EMAIL PROTECTED]
> callto://stansilvert
> 
> > -----Original Message-----
> > From: Papaioannou, Todd [mailto:[EMAIL PROTECTED]
> > Sent: Monday, February 27, 2006 3:07 PM
> > To: [email protected]
> > Subject: Do Portlet Modes and JSF navigation work together?
> > 
> > I have been attempting to build a JSF based portlet with 
> MyFaces and 
> > have been having a problem in getting JSF navigation to work with 
> > myfaces-1.1.1.
> > I followed the instructions on the Wiki for how to create my own
> portlet
> > and
> > add edit modes. This works great and I can deploy it into my portal 
> > server (liferay).
> > 
> > However, any time I try to induce a navigation action within my JSF 
> > pages the view always returns to the default view. I can of course, 
> > navigate to my Edit and Help pages.
> > 
> > If I use myfaces 1.0.9 then I can successfully use the navigation
> rules
> > and
> > move through the pages of my app. But of course, I can not have
> anything
> > other than the View mode active.
> > 
> > Is this is a known issue? Or am I missing something?
> > 
> > If someone could point me towards an example of a JSF portlet that 
> > supports all modes, that would be great.
> > 
> > Thanks
> > 
> > Todd
> 
> 

Attachment: MultiModePortlet.java
Description: MultiModePortlet.java

<?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>
 <managed-bean>
  <managed-bean-name>user</managed-bean-name>
  <managed-bean-class>com.teradata.portlet.beans.UserBean</managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
 </managed-bean>
 <navigation-rule>
  <from-view-id>/index.jsp</from-view-id>
  <navigation-case>
   <from-outcome>submit</from-outcome>
   <to-view-id>/welcome.jsp</to-view-id>
  </navigation-case>
 </navigation-rule>
 <navigation-rule>
  <from-view-id>/welcome.jsp</from-view-id>
  <navigation-case>
   <from-outcome>back</from-outcome>
   <to-view-id>/index.jsp</to-view-id>
  </navigation-case>
 </navigation-rule>
 <factory>
  <faces-context-factory>org.apache.myfaces.context.MyFacesContextFactoryImpl</faces-context-factory>
 </factory>
 <lifecycle/>
 <application>
  <locale-config/>
 </application>
</faces-config>
<?xml version="1.0"?>

<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"; version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";>
	<portlet>
		<portlet-name>sample_jsf_myfaces_portlet</portlet-name>
		<display-name>MyFaces Starter Kit Portlet</display-name>
		<portlet-class>com.teradata.portlet.MultiModePortlet</portlet-class>
		
		<init-param>
			<name>ViewPage</name>
			<value>/index.jsp</value>
		</init-param>
		<init-param>
			<name>EditPage</name>
			<value>/edit.jsp</value>
		</init-param>
		<init-param>
			<name>HelpPage</name>
			<value>/help.jsp</value>
		</init-param>
		
		<supports>
			<mime-type>text/html</mime-type>
			<portlet-mode>VIEW</portlet-mode>
			<portlet-mode>EDIT</portlet-mode>
			<portlet-mode>HELP</portlet-mode>
		</supports>
		<portlet-info>
			<title>Sample JSF MyFaces Portlet</title>
			<short-title>Sample JSF MyFaces Portlet</short-title>
			<keywords>Sample JSF MyFaces Portlet</keywords>
		</portlet-info>
		<security-role-ref>
			<role-name>guest</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>power-user</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>user</role-name>
		</security-role-ref>
	</portlet>
</portlet-app>
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>

<web-app>
	<display-name>sample_jsf_myfaces_portlet</display-name>
	<context-param>
		<param-name>company_id</param-name>
		<param-value>liferay.com</param-value>
	</context-param>
	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>client</param-value>
	</context-param>
	<context-param>
		<param-name>javax.faces.application.CONFIG_FILES</param-name>
		<param-value>/WEB-INF/faces-config.xml</param-value>
	</context-param>
	<listener>
		<listener-class>com.liferay.portal.servlet.PortletContextListener</listener-class>
	</listener>
	<listener>
		<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
	</listener>
	<servlet>
		<servlet-name>sample_jsf_myfaces_portlet</servlet-name>
		<servlet-class>com.liferay.portal.servlet.PortletServlet</servlet-class>
		<init-param>
			<param-name>portlet-class</param-name>
			<param-value>org.apache.myfaces.portlet.MyFacesGenericPortlet</param-value>
		</init-param>
		<load-on-startup>0</load-on-startup>
	</servlet>
	<servlet>
		<servlet-name>FacesServlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>sample_jsf_myfaces_portlet</servlet-name>
		<url-pattern>/sample_jsf_myfaces_portlet/*</url-pattern>
	</servlet-mapping>
	<taglib>
		<taglib-uri>http://java.sun.com/portlet</taglib-uri>
		<taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
	</taglib>
</web-app>

Reply via email to