Author: thomas.heute(a)jboss.com
Date: 2009-01-21 15:50:56 -0500 (Wed, 21 Jan 2009)
New Revision: 12599
Removed:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/RedirectOnNoConsumerListener.java
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
Log:
Rollbacked r12591.
Was breaking "Producer configuration" tab
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2009-01-21
20:45:40 UTC (rev 12598)
+++
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2009-01-21
20:50:56 UTC (rev 12599)
@@ -1,25 +1,24 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2009, 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. *
- ******************************************************************************/
+/*
+* 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.wsrp.admin.ui;
@@ -45,20 +44,18 @@
{
private ConsumerRegistry registry;
private String selectedId;
+ private static final String CONSUMER_ID = "consumerId";
+ static final String CONFIGURE_CONSUMER = "configureConsumer";
+ static final String CONSUMERS = "consumers";
+ static final String EXPECTED_REG_INFO_KEY = "expectedRegistrationInfo";
private static final String NO_CONSUMER =
"bean_consumermanager_no_consumer";
private static final String INVALID_NEW_CONSUMER_NAME =
"bean_consumermanager_invalid_new_consumer_name";
private static final String REFRESH_BYPASSED =
"bean_consumermanager_refresh_bypassed";
private static final String REFRESH_SUCCESS =
"bean_consumermanager_refresh_success";
private static final String REFRESH_FAILURE =
"bean_consumermanager_refresh_failure";
private static final String REFRESH_EXCEPTION =
"bean_consumermanager_refresh_exception";
- static final String CONFIGURE_CONSUMER = "configureConsumer";
-
- static final String CONSUMERS = "consumers";
- static final String EXPECTED_REG_INFO_KEY = "expectedRegistrationInfo";
static final String REFRESH_MODIFY = "bean_consumermanager_refresh_modify";
- static final String REQUESTED_CONSUMER_ID = "id";
- static final String SESSION_CONSUMER_ID = "consumerId";
public ConsumerRegistry getRegistry()
{
@@ -331,7 +328,7 @@
private String refreshConsumerId()
{
- selectedId = beanContext.getParameter(REQUESTED_CONSUMER_ID);
+ selectedId = beanContext.getParameter("id");
return selectedId;
}
@@ -345,11 +342,11 @@
if (!remove)
{
- sessionMap.put(SESSION_CONSUMER_ID, selectedId);
+ sessionMap.put(CONSUMER_ID, selectedId);
}
else
{
- sessionMap.remove(SESSION_CONSUMER_ID);
+ sessionMap.remove(CONSUMER_ID);
}
}
Deleted:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/RedirectOnNoConsumerListener.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/RedirectOnNoConsumerListener.java 2009-01-21
20:45:40 UTC (rev 12598)
+++
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/RedirectOnNoConsumerListener.java 2009-01-21
20:50:56 UTC (rev 12599)
@@ -1,69 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2009, 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.wsrp.admin.ui;
-
-import org.jboss.portal.faces.gui.JSFBeanContext;
-
-import javax.faces.application.NavigationHandler;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
- * @version $Revision$
- */
-public class RedirectOnNoConsumerListener implements PhaseListener
-{
- public void afterPhase(PhaseEvent phaseEvent)
- {
- FacesContext facesContext = phaseEvent.getFacesContext();
-
- // check if we have a currently selected consumer in the request...
- String currentConsumer =
JSFBeanContext.getParameter(ConsumerManagerBean.REQUESTED_CONSUMER_ID, facesContext);
-
- // if not, check the session...
- if (currentConsumer == null)
- {
- currentConsumer =
(String)JSFBeanContext.getSessionMap(facesContext).get(ConsumerManagerBean.SESSION_CONSUMER_ID);
-
- // if we still don't have consumer id, redirect to consumer list view
- if (currentConsumer == null)
- {
- NavigationHandler navigationHandler =
facesContext.getApplication().getNavigationHandler();
- navigationHandler.handleNavigation(facesContext, null,
"consumers");
- }
- }
- }
-
- public void beforePhase(PhaseEvent phaseEvent)
- {
- }
-
- public PhaseId getPhaseId()
- {
- return PhaseId.RESTORE_VIEW;
- }
-}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2009-01-21
20:45:40 UTC (rev 12598)
+++
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2009-01-21
20:50:56 UTC (rev 12599)
@@ -1,29 +1,29 @@
<?xml version="1.0"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ JBoss, a division of Red Hat ~
- ~ Copyright 2009, 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
+ ~ Copyright 2007, 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. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.0//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
@@ -34,17 +34,13 @@
org.jboss.portletbridge.application.PortletViewHandler
</view-handler>
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
- <locale-config>
+ <locale-config>
<default-locale>en</default-locale>
<supported-locale>fr</supported-locale>
<supported-locale>ja</supported-locale>
</locale-config>
</application>
- <lifecycle>
-
<phase-listener>org.jboss.portal.wsrp.admin.ui.RedirectOnNoConsumerListener</phase-listener>
- </lifecycle>
-
<converter>
<converter-for-class>org.jboss.portal.wsrp.registration.LocalizedString</converter-for-class>
<converter-class>org.jboss.portal.wsrp.admin.ui.LocalizedStringConverter</converter-class>
Modified:
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java 2009-01-21
20:45:40 UTC (rev 12598)
+++
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java 2009-01-21
20:50:56 UTC (rev 12599)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * Copyright 2007, 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. *
@@ -174,7 +174,7 @@
}
getFromSession(name, newValue.getClass(), sessionMap, "Provided object: "
+ newValue
- + " is not compatible with previously assigned '" + name +
"' object: " + CURRENT_PLACEHOLDER);
+ + " is not compatible with previously assigned '" + name +
"' object: " + CURRENT_PLACEHOLDER);
sessionMap.put(name, newValue);
return newValue;
}
@@ -192,7 +192,7 @@
public <T> T getFromSession(String name, Class<T> expectedClass)
{
return getFromSession(name, expectedClass, getSessionMap(), "Current
object:" + CURRENT_PLACEHOLDER
- + " is not compatible with expected class " + expectedClass + "
for '" + name + "'");
+ + " is not compatible with expected class " + expectedClass +
" for '" + name + "'");
}
/**
Modified:
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java 2009-01-21
20:45:40 UTC (rev 12598)
+++
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java 2009-01-21
20:50:56 UTC (rev 12599)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * Copyright 2007, 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. *
@@ -37,25 +37,15 @@
{
public String getParameter(String key)
{
- return getParameter(key, FacesContext.getCurrentInstance());
- }
-
- public static String getParameter(String key, FacesContext facesContext)
- {
- Map pmap = facesContext.getExternalContext().getRequestParameterMap();
+ Map pmap =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
return (String)pmap.get(key);
}
public Map<String, Object> getSessionMap()
{
- return JSFBeanContext.getSessionMap(FacesContext.getCurrentInstance());
+ return FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
}
- public static Map<String, Object> getSessionMap(FacesContext facesContext)
- {
- return facesContext.getExternalContext().getSessionMap();
- }
-
protected void createMessage(String target, String message, Object severity)
{
FacesMessage.Severity jsfSeverity;