Author: julien(a)jboss.com
Date: 2007-05-23 11:49:45 -0400 (Wed, 23 May 2007)
New Revision: 7315
Added:
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java
Removed:
trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml
Log:
update of JSF meta bridge to handle the myfaces servlet context listener
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-05-23
12:35:12 UTC (rev 7314)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -69,7 +69,6 @@
private Map childrenMap;
private Map properties;
private Map unmodifiableProperties;
-// private DashboardContext dashboardContext;
public PortalObjectImpl()
{
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-05-23 12:35:12
UTC (rev 7314)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-05-23 15:49:45
UTC (rev 7315)
@@ -74,15 +74,16 @@
<param-value>server</param-value>
</context-param>
- <!-- -->
+ <!-- The JSF servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
- <!-- -->
+ <!-- The JSF meta bridge bootstrap -->
<listener>
-
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ <display-name> Faces Meta Bridge Bootstrap</display-name>
+
<listener-class>org.jboss.portal.faces.portlet.JSFMetaBridgeBootstrap</listener-class>
</listener>
</web-app>
Deleted: trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java 2007-05-23
12:35:12 UTC (rev 7314)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -1,74 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.faces.portlet;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class BridgeInfo
-{
-
- /** . */
- static final BridgeInfo SUN_JSF = new BridgeInfo(
- "jsfportletbridge",
- "com.sun.faces.portlet.FacesPortlet",
- "com.sun.faces.portlet.INIT_VIEW");
-
- /** . */
- static final BridgeInfo MYFACES_JSF = new BridgeInfo(
- "myfaces",
- "org.apache.myfaces.portlet.MyFacesGenericPortlet",
- "default-view");
-
- /** . */
- private final String name;
-
- /** . */
- private final String portletClassName;
-
- /** . */
- private final String initParamViewName;
-
- public BridgeInfo(String name, String portletClassName, String initParamViewName)
- {
- this.name = name;
- this.portletClassName = portletClassName;
- this.initParamViewName = initParamViewName;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getPortletClassName()
- {
- return portletClassName;
- }
-
- public String getInitParamViewName()
- {
- return initParamViewName;
- }
-}
Deleted: trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java
===================================================================
---
trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java 2007-05-23
12:35:12 UTC (rev 7314)
+++
trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -1,91 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.faces.portlet;
-
-import org.jboss.portal.common.util.Tools;
-
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import java.util.ResourceBundle;
-import java.util.Locale;
-import java.util.Enumeration;
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class BridgePortletConfig implements PortletConfig
-{
-
- /** . */
- private final PortletConfig delegate;
-
- /** . */
- private final BridgeInfo bridgeInfo;
-
- public BridgePortletConfig(PortletConfig delegate, BridgeInfo bridgeInfo)
- {
- this.delegate = delegate;
- this.bridgeInfo = bridgeInfo;
- }
-
- public String getPortletName()
- {
- return delegate.getPortletName();
- }
-
- public PortletContext getPortletContext()
- {
- return delegate.getPortletContext();
- }
-
- public ResourceBundle getResourceBundle(Locale locale)
- {
- return delegate.getResourceBundle(locale);
- }
-
- public String getInitParameter(String name) throws IllegalArgumentException
- {
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- if (bridgeInfo.getInitParamViewName().equals(name))
- {
- return delegate.getInitParameter("VIEW");
- }
-
- //
- return delegate.getInitParameter(name);
- }
-
- public Enumeration getInitParameterNames()
- {
- List names = Tools.toList(delegate.getInitParameterNames());
- names.add(bridgeInfo.getInitParamViewName());
- return Tools.toEnumeration(names.iterator());
- }
-}
Copied: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java (from rev
7310, trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java)
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java
(rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridge
+{
+
+ /** . */
+ static final JSFMetaBridge SUN_JSF = new JSFMetaBridge(
+ "jsfportletbridge",
+ "com.sun.faces.portlet.FacesPortlet",
+ "com.sun.faces.portlet.INIT_VIEW"
+ );
+
+ /** . */
+ static final JSFMetaBridge MYFACES_JSF = new JSFMetaBridge(
+ "myfaces",
+ "org.apache.myfaces.portlet.MyFacesGenericPortlet",
+ "default-view"
+ );
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final String portletClassName;
+
+ /** . */
+ private final String initParamViewName;
+
+ public JSFMetaBridge(String name, String portletClassName, String initParamViewName)
+ {
+ this.name = name;
+ this.portletClassName = portletClassName;
+ this.initParamViewName = initParamViewName;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getPortletClassName()
+ {
+ return portletClassName;
+ }
+
+ public String getInitParamViewName()
+ {
+ return initParamViewName;
+ }
+}
Added: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java
(rev 0)
+++
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridgeBootstrap implements ServletContextListener
+{
+
+ /** . */
+ private static final Logger log = Logger.getLogger(JSFMetaBridgeBootstrap.class);
+
+ /** . */
+ private ServletContextListener listener;
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ String servletContextListenerClassName =
"org.apache.myfaces.webapp.StartupServletContextListener";
+
+ //
+ //
+ try
+ {
+ Class bridgeClass =
Thread.currentThread().getContextClassLoader().loadClass(servletContextListenerClassName);
+ log.debug("Obtain bridge bootstrap class " + bridgeClass.getName());
+ listener = (ServletContextListener)bridgeClass.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+ // It is not an error, this happens when we run with Sun RI
+ log.debug("Bridge bootstrap not available " +
servletContextListenerClassName, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ log.error("Bridge bootstrap not accessible " +
servletContextListenerClassName, e);
+ }
+ catch (InstantiationException e)
+ {
+ log.error("Bridge bootstrap not instantiable " +
servletContextListenerClassName, e);
+ }
+
+ //
+ if (listener != null)
+ {
+ log.debug("About to initialize the bridge bootstrap");
+ listener.contextInitialized(event);
+ }
+ }
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ if (listener != null)
+ {
+ log.debug("About to destroy the bridge bootstrap");
+ listener.contextDestroyed(event);
+ }
+ }
+}
Added: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java
(rev 0)
+++
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+import org.apache.log4j.Logger;
+
+import javax.faces.FactoryFinder;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridgeFactory
+{
+
+ /** . */
+ private static final Logger log = Logger.getLogger(JSFMetaBridgeFactory.class);
+
+ public static JSFMetaBridge getMetaBridge()
+ {
+ JSFMetaBridge metaBridge = null;
+
+ //
+ String className =
FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY).getClass().getName();
+ if
("com.sun.faces.application.ApplicationFactoryImpl".equals(className))
+ {
+ metaBridge = JSFMetaBridge.SUN_JSF;
+ }
+ else if
("org.apache.myfaces.application.ApplicationFactoryImpl".equals(className))
+ {
+ metaBridge = JSFMetaBridge.MYFACES_JSF;
+ }
+
+ //
+ if (metaBridge != null)
+ {
+ log.debug("Detected JSF bridge " + metaBridge.getName());
+ }
+ else
+ {
+ log.warn("No bridge detected for application factory " + className);
+ }
+
+ //
+ return metaBridge;
+ }
+
+}
Modified: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java
===================================================================
---
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java 2007-05-23
12:35:12 UTC (rev 7314)
+++
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -32,7 +32,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.faces.FactoryFinder;
import java.io.IOException;
/**
@@ -48,66 +47,56 @@
private static final Logger log = Logger.getLogger(JSFMetaBridgePortlet.class);
/** . */
- private Portlet bridge;
+ private Portlet bridgePortlet;
public void init(PortletConfig config) throws PortletException
{
- BridgeInfo bridgeInfo;
- String className =
FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY).getClass().getName();
- if
("com.sun.faces.application.ApplicationFactoryImpl".equals(className))
+ JSFMetaBridge metaBridge = JSFMetaBridgeFactory.getMetaBridge();
+
+ //
+ if (metaBridge == null)
{
- bridgeInfo = BridgeInfo.SUN_JSF;
+ throw new PortletException("No bridge meta data available");
}
- else if
("org.apache.myfaces.application.ApplicationFactoryImpl".equals(className))
- {
- bridgeInfo = BridgeInfo.MYFACES_JSF;
- }
- else
- {
- throw new PortletException("No bridge detected for application factory
" + className);
- }
//
- log.debug("Detected JSF bridge " + bridgeInfo.getName());
-
- //
try
{
- Class bridgeClass =
Thread.currentThread().getContextClassLoader().loadClass(bridgeInfo.getPortletClassName());
+ Class bridgeClass =
Thread.currentThread().getContextClassLoader().loadClass(metaBridge.getPortletClassName());
log.debug("Obtain bridge class " + bridgeClass.getName());
- bridge = (Portlet)bridgeClass.newInstance();
+ bridgePortlet = (Portlet)bridgeClass.newInstance();
}
catch (ClassNotFoundException e)
{
- log.error("Bridge class not available " +
bridgeInfo.getPortletClassName(), e);
+ log.error("Bridge class not available " +
metaBridge.getPortletClassName(), e);
}
catch (IllegalAccessException e)
{
- log.error("Bridge class not accessible", e);
+ log.error("Bridge class not accessible" +
metaBridge.getPortletClassName(), e);
}
catch (InstantiationException e)
{
- log.error("Bridge class not instantiable", e);
+ log.error("Bridge class not instantiable" +
metaBridge.getPortletClassName(), e);
}
- //
- PortletConfig bridgeConfig = new BridgePortletConfig(config, bridgeInfo);
- bridge.init(bridgeConfig);
+ // Proceed to life cycle
+ PortletConfig bridgeConfig = new JSFMetaBridgePortletConfig(config, metaBridge);
+ bridgePortlet.init(bridgeConfig);
}
public void processAction(ActionRequest request, ActionResponse response) throws
PortletException, PortletSecurityException, IOException
{
- bridge.processAction(request, response);
+ bridgePortlet.processAction(request, response);
}
public void render(RenderRequest request, RenderResponse response) throws
PortletException, PortletSecurityException, IOException
{
- bridge.render(request, response);
+ bridgePortlet.render(request, response);
}
public void destroy()
{
- bridge.destroy();
- bridge = null;
+ bridgePortlet.destroy();
+ bridgePortlet = null;
}
}
Copied:
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java (from
rev 7310, trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java)
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java
(rev 0)
+++
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java 2007-05-23
15:49:45 UTC (rev 7315)
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+import org.jboss.portal.common.util.Tools;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import java.util.ResourceBundle;
+import java.util.Locale;
+import java.util.Enumeration;
+import java.util.List;
+
+/**
+ * Wrapper of a portlet config that provides translations of init parameters for the
target bridge.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridgePortletConfig implements PortletConfig
+{
+
+ /** . */
+ private final PortletConfig delegate;
+
+ /** . */
+ private final JSFMetaBridge metaBridge;
+
+ public JSFMetaBridgePortletConfig(PortletConfig delegate, JSFMetaBridge metaBridge)
+ {
+ this.delegate = delegate;
+ this.metaBridge = metaBridge;
+ }
+
+ public String getPortletName()
+ {
+ return delegate.getPortletName();
+ }
+
+ public PortletContext getPortletContext()
+ {
+ return delegate.getPortletContext();
+ }
+
+ public ResourceBundle getResourceBundle(Locale locale)
+ {
+ return delegate.getResourceBundle(locale);
+ }
+
+ public String getInitParameter(String name) throws IllegalArgumentException
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ if (metaBridge.getInitParamViewName().equals(name))
+ {
+ return delegate.getInitParameter("VIEW");
+ }
+
+ //
+ return delegate.getInitParameter(name);
+ }
+
+ public Enumeration getInitParameterNames()
+ {
+ List names = Tools.toList(delegate.getInitParameterNames());
+ names.add(metaBridge.getInitParamViewName());
+ return Tools.toEnumeration(names.iterator());
+ }
+}
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml 2007-05-23 12:35:12 UTC (rev
7314)
+++ trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml 2007-05-23 15:49:45 UTC (rev
7315)
@@ -158,9 +158,10 @@
<load-on-startup>1</load-on-startup>
</servlet>
- <!-- Bootstrap MyFaces -->
+ <!-- The JSF meta bridge bootstrap -->
<listener>
-
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ <display-name> Faces Meta Bridge Bootstrap</display-name>
+
<listener-class>org.jboss.portal.faces.portlet.JSFMetaBridgeBootstrap</listener-class>
</listener>
</web-app>