You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2012/08/03 16:33:16 UTC
svn commit: r1368982 [1/3] - in /myfaces/core/branches/2.1.x-client-window:
./ api/src/main/java/javax/faces/context/
api/src/main/java/javax/faces/lifecycle/
api/src/main/java/javax/faces/render/ api/src/main/java/javax/faces/webapp/
client-window-exa...
Author: lu4242
Date: Fri Aug 3 14:33:13 2012
New Revision: 1368982
URL: http://svn.apache.org/viewvc?rev=1368982&view=rev
Log:
MYFACES-3588 window-id support (step 1, implement JSF 2.2 early draft api)
Added:
myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/ClientWindow.java (with props)
myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/LifecycleWrapper.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/ (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/pom.xml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/ (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/HelloWorldController.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/FlashBean.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/HelloWorldFlashBean.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java
- copied, changed from r1367981, myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/context/flash/SubKeyMap.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/resources/ (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/templates/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/templates/example.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/faces-config.xml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/web.xml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flash1.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flash1.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flash2.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flash2.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flash3.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flash3.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashKeep1.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashKeep1.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashKeep2.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashKeep2.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashKeep3.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashKeep3.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashKeepConfirmation.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashKeepEntry.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashKeepFinished.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashg1.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashg1.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashg2.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashg2.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashhw1.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashhw1.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashhw2.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashhw2.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashprg1.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashprg1.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/flashprg2.xhtml
- copied, changed from r1366644, myfaces/current20/test-webapp/webapp/src/main/webapp/flashprg2.xhtml
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/helloWorld.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/home.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/index.html (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/page2.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/resources/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/resources/clientWindow/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/resources/clientWindow/disableClientWindow.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/resources/clientWindow/enableClientWindow.xhtml (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/resources/css/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/resources/css/style.css (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/clientWindow/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/clientWindow/CheckFaceletsFileTestCase.java (with props)
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/resources/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/resources/webapp/
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/resources/webapp/README.txt (with props)
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/CODIClientSideWindow.java (with props)
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/ClientConfig.java
- copied, changed from r1368705, myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/ClientConfig.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/TokenGenerator.java (with props)
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/UrlClientWindow.java (with props)
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/WindowContextConfig.java
- copied, changed from r1368705, myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/WindowContextConfig.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/resources/META-INF/resources/
myfaces/core/branches/2.1.x-client-window/impl/src/main/resources/META-INF/resources/org.apache.myfaces.windowId/
myfaces/core/branches/2.1.x-client-window/impl/src/main/resources/META-INF/resources/org.apache.myfaces.windowId/windowhandler.html (with props)
Modified:
myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContext.java
myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContextWrapper.java
myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/Lifecycle.java
myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/render/ResponseStateManager.java
myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/webapp/FacesServlet.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImplBase.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/renderkit/ServerSideStateCacheImpl.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
myfaces/core/branches/2.1.x-client-window/pom.xml
myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/context/flash/FlashImpl.java
Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContext.java?rev=1368982&r1=1368981&r2=1368982&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContext.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContext.java Fri Aug 3 14:33:13 2012
@@ -26,6 +26,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
+import javax.faces.lifecycle.ClientWindow;
/**
* see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
@@ -736,4 +737,34 @@ public abstract class ExternalContext
ctx.setSessionMaxInactiveInterval(interval);
}
+
+ public ClientWindow getClientWindow()
+ {
+ ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get();
+
+ if (ctx == null)
+ {
+ /*throw new UnsupportedOperationException();*/
+ // TODO: Return null for now, but it should throw exception
+ // in JSF 2.2
+ return null;
+ }
+
+ return ctx.getClientWindow();
+ }
+
+ public void setClientWindow(ClientWindow window)
+ {
+ // No op for now.
+ /*
+ ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get();
+
+ if (ctx == null)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ ctx.setClientWindow(window);
+ */
+ }
}
Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContextWrapper.java?rev=1368982&r1=1368981&r2=1368982&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContextWrapper.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/ExternalContextWrapper.java Fri Aug 3 14:33:13 2012
@@ -33,6 +33,7 @@ import java.util.Map;
import java.util.Set;
import javax.faces.FacesWrapper;
+import javax.faces.lifecycle.ClientWindow;
/**
* @author Simon Lessard (latest modification by $Author$)
@@ -477,4 +478,17 @@ public abstract class ExternalContextWra
{
getWrapped().setSessionMaxInactiveInterval(interval);
}
+
+ @Override
+ public ClientWindow getClientWindow()
+ {
+ return getWrapped().getClientWindow();
+ }
+
+ @Override
+ public void setClientWindow(ClientWindow window)
+ {
+ getWrapped().setClientWindow(window);
+ }
+
}
Added: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/ClientWindow.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/ClientWindow.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/ClientWindow.java (added)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/ClientWindow.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package javax.faces.lifecycle;
+
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ * @since 2.2
+ * @author Leonardo Uribe
+ */
+public abstract class ClientWindow
+{
+
+ public static final String CLIENT_WINDOW_MODE_PARAM_NAME =
+ "javax.faces.CLIENT_WINDOW_MODE";
+
+ private static final String CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED =
+ "org.apache.myfaces.CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED";
+
+ public abstract void decode(FacesContext context);
+
+ public abstract String getId();
+
+ public static boolean isClientWindowUrlQueryParameterEnabled(FacesContext context)
+ {
+ // By default is enabled, so it is easier to check the opposite.
+ return !Boolean.TRUE.equals(
+ context.getAttributes().get(CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED));
+ }
+
+ public static void disableClientWindowUrlQueryParameter(FacesContext context)
+ {
+ context.getAttributes().put(CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED, Boolean.TRUE);
+ }
+
+ public static void enableClientWindowUrlQueryParameter(FacesContext context)
+ {
+ context.getAttributes().put(CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED, Boolean.FALSE);
+ }
+}
Propchange: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/ClientWindow.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/Lifecycle.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/Lifecycle.java?rev=1368982&r1=1368981&r2=1368982&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/Lifecycle.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/Lifecycle.java Fri Aug 3 14:33:13 2012
@@ -19,6 +19,7 @@
package javax.faces.lifecycle;
import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
/**
* see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
@@ -39,4 +40,14 @@ public abstract class Lifecycle
public abstract void render(javax.faces.context.FacesContext context)
throws FacesException;
+
+ /**
+ *
+ * @since 2.2
+ * @param context
+ */
+ public void attachWindow(FacesContext context)
+ {
+
+ }
}
Added: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/LifecycleWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/LifecycleWrapper.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/LifecycleWrapper.java (added)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/LifecycleWrapper.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package javax.faces.lifecycle;
+
+import javax.faces.FacesException;
+import javax.faces.FacesWrapper;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseListener;
+
+/**
+ *
+ * @author Leonardo Uribe
+ */
+public abstract class LifecycleWrapper extends Lifecycle implements FacesWrapper<Lifecycle>
+{
+
+ public void render(FacesContext context) throws FacesException
+ {
+ getWrapped().render(context);
+ }
+
+ public void removePhaseListener(PhaseListener listener)
+ {
+ getWrapped().removePhaseListener(listener);
+ }
+
+ public PhaseListener[] getPhaseListeners()
+ {
+ return getWrapped().getPhaseListeners();
+ }
+
+ public void execute(FacesContext context) throws FacesException
+ {
+ getWrapped().execute(context);
+ }
+
+ public void attachWindow(FacesContext context)
+ {
+ getWrapped().attachWindow(context);
+ }
+
+ public void addPhaseListener(PhaseListener listener)
+ {
+ getWrapped().addPhaseListener(listener);
+ }
+
+ public abstract LifecycleWrapper getWrapped();
+
+}
Propchange: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/lifecycle/LifecycleWrapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/render/ResponseStateManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/render/ResponseStateManager.java?rev=1368982&r1=1368981&r2=1368982&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/render/ResponseStateManager.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/render/ResponseStateManager.java Fri Aug 3 14:33:13 2012
@@ -34,6 +34,9 @@ public abstract class ResponseStateManag
{
public static final String RENDER_KIT_ID_PARAM = "javax.faces.RenderKitId";
public static final String VIEW_STATE_PARAM = "javax.faces.ViewState";
+
+ public static final String CLIENT_WINDOW_PARAM = "javax.faces.ClientWindow";
+ public static final String CLIENT_WINDOW_URL_PARAM = "jfwid";
public void writeState(FacesContext context, Object state) throws IOException
{
Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/webapp/FacesServlet.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/webapp/FacesServlet.java?rev=1368982&r1=1368981&r2=1368982&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/webapp/FacesServlet.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/webapp/FacesServlet.java Fri Aug 3 14:33:13 2012
@@ -192,6 +192,8 @@ public final class FacesServlet implemen
}
else
{
+ //JSF 2.2: attach window
+ _lifecycle.attachWindow(facesContext);
// If this returns false, handle as follows:
// call Lifecycle.execute(javax.faces.context.FacesContext)
_lifecycle.execute(facesContext);
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Aug 3 14:33:13 2012
@@ -0,0 +1 @@
+target
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/pom.xml?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/pom.xml (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/pom.xml Fri Aug 3 14:33:13 2012
@@ -0,0 +1,504 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>myfaces-core-module</artifactId>
+ <groupId>org.apache.myfaces.core</groupId>
+ <version>2.1.9-CLIENT-WINDOW-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.myfaces.example.clientWindow</groupId>
+ <artifactId>client-window-example</artifactId>
+ <packaging>war</packaging>
+ <version>2.1.9-CLIENT-WINDOW-SNAPSHOT</version>
+ <name>client-window-example</name>
+ <description>A custom project used to debug MyFaces Core 2.0</description>
+ <url>http://www.myorganization.org</url>
+
+ <!-- Instructions
+ This project uses myfaces-test and myfaces-impl test jar
+ to make easier create specific tests for myfaces core that
+ later could be included into myfaces codebase.
+ - Run using jetty
+ mvn clean jetty:run
+ mvn clean -Dcontainer=jetty-mojarra jetty:run
+ Set your browser to http://localhost:8080/client-window-example
+ - Run using tomcat
+ mvn clean -Dcontainer=tomcat7 tomcat:run
+ Set your browser to http://localhost:8080/client-window-example
+ - Run war using tomcat
+ mvn clean -Dcontainer=tomcat7 tomcat:run-war
+ Set your browser to http://localhost:8080/client-window-example
+ - Run war using jetty (remove <webApp> config inside plugin config first)
+ mvn clean jetty:run-war
+ mvn clean -Dcontainer=jetty-mojarra jetty:run-war
+ Set your browser to http://localhost:8080
+ - Build war and bundle JSF jars
+ mvn clean -Pbundle-myfaces install
+ mvn clean -Pbundle-mojarra install
+ - Run using tomcat 6.0
+ mvn clean -Dcontainer=tomcat tomcat:run-war
+ - Run using tomcat 7.0 through cargo
+ mvn clean -Dcontainer=tomcat7 install cargo:run
+ -->
+
+ <properties>
+ <jsf-myfaces.version>2.1.9-CLIENT-WINDOW-SNAPSHOT</jsf-myfaces.version>
+ <jsf-mojarra.version>2.1.7</jsf-mojarra.version>
+ <jetty.maven.plugin.version>8.1.3.v20120416</jetty.maven.plugin.version>
+ <cargo.version>1.1.1</cargo.version>
+ </properties>
+
+ <build>
+ <finalName>client-window-example</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <!-- The following plugin is used to pack everything inside
+ webapp folder and make it available on test jar under
+ the path "webapp". This allows create junit tests over
+ those files like for example, check if all facelets
+ compile, if a view is correctly built or if render
+ what is expected. -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>add-webapp-folder-as-test</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>add-test-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>src/main/webapp</directory>
+ <targetPath>webapp</targetPath>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <!-- Project dependencies -->
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-servlet_2.5_spec</artifactId>
+ <version>1.2</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-el_2.2_spec</artifactId>
+ <version>1.0.2</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-annotation_1.0_spec</artifactId>
+ <version>1.1.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JSF API: Add here as provided dependency and then add it
+ on jetty-maven-plugin as compile/runtime dependency.
+ The same goes for other JSF libraries. -->
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.test</groupId>
+ <artifactId>myfaces-test20</artifactId>
+ <version>1.0.4</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>bundle-myfaces</id>
+ <activation>
+ <property>
+ <name>jsf</name>
+ <value>myfaces</value>
+ </property>
+ </activation>
+ <!-- Include MyFaces jars into the war -->
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <!-- Plugin embedded jetty 8 container.
+ Just running use:
+ mvn clean jetty:run
+ -->
+ <!-- For debugging use (attach debugger port 8000):
+ mvnDebug clean jetty:run
+ -->
+ <id>jettyConfig</id>
+ <activation>
+ <property>
+ <name>!container</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <!--This plugin allows to run the war using mvn jetty:run -->
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>${jetty.maven.plugin.version}</version>
+ <configuration>
+ <systemProperties>
+ <systemProperty>
+ <!-- optional to use the ecj compiler -->
+ <name>org.apache.jasper.compiler.disablejsr199</name>
+ <value>true</value>
+ </systemProperty>
+ </systemProperties>
+ <webApp>
+ <contextPath>/${artifactId}</contextPath>
+ </webApp>
+ <scanIntervalSeconds>5</scanIntervalSeconds>
+ </configuration>
+ <dependencies>
+ <!-- Tld scanning only works when JSF is included
+ as container dependency. Add other jsf libraries
+ here, so jetty:run goal can find and process them -->
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>bundle-mojarra</id>
+ <activation>
+ <property>
+ <name>jsf</name>
+ <value>mojarra</value>
+ </property>
+ </activation>
+ <!-- Include Mojarra jars into the war -->
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>${jsf-mojarra.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>${jsf-mojarra.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+ </profile>
+
+ <profile>
+ <!-- Plugin embedded jetty 8 container.
+ Just running use:
+ mvn clean -Dcontainer=jetty-mojarra jetty:run
+ -->
+ <!-- For debugging use (attach debugger port 8000):
+ mvn clean -Dcontainer=jetty-mojarra jetty:run
+ -->
+ <id>jettyConfig-mojarra</id>
+ <activation>
+ <property>
+ <name>container</name>
+ <value>jetty-mojarra</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <!--This plugin allows to run the war using mvn jetty:run -->
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>${jetty.maven.plugin.version}</version>
+ <configuration>
+ <systemProperties>
+ <systemProperty>
+ <!-- optional to use the ecj compiler -->
+ <name>org.apache.jasper.compiler.disablejsr199</name>
+ <value>true</value>
+ </systemProperty>
+ </systemProperties>
+ <webApp>
+ <contextPath>/${artifactId}</contextPath>
+ </webApp>
+ <scanIntervalSeconds>5</scanIntervalSeconds>
+ </configuration>
+ <dependencies>
+ <!-- Tld scanning only works when JSF is included
+ as container dependency. Add other jsf libraries
+ here, so jetty:run goal can find and process them -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>${jsf-mojarra.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>${jsf-mojarra.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <repositories>
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+ </profile>
+
+ <profile>
+ <id>maven-tomcat7</id>
+ <activation>
+ <property>
+ <name>container</name>
+ <value>tomcat7</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <version>2.0-beta-1</version>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <!-- Plugin embedded tomcat 6 container.
+ Just running use:
+ mvn clean -Dcontainer=tomcat tomcat:run-war
+ -->
+ <!-- For debugging use (attach debugger port 8000):
+ mvnDebug clean -Dcontainer=tomcat tomcat:run-war
+ -->
+ <id>tomcat</id>
+ <activation>
+ <property>
+ <name>container</name>
+ <value>tomcat</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <!-- Installed tomcat 7 running war file through cargo
+ Attach debugger on port 8000:
+ mvn clean -Dcontainer=tomcat7 install cargo:run -->
+ <id>cargo-tomcat7</id>
+ <activation>
+ <property>
+ <name>container</name>
+ <value>tomcat7</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>${cargo.version}</version>
+ <configuration>
+ <wait>true</wait>
+ <properties>
+ <cargo.servlet.port>8080</cargo.servlet.port>
+ <cargo.jvmargs>-Xdebug
+ -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
+ -Xnoagent
+ -Djava.compiler=NONE</cargo.jvmargs>
+ </properties>
+ <container>
+ <containerId>tomcat7x</containerId>
+ <zipUrlInstaller>
+ <url>http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.zip</url>
+ <!--
+ <installDir>${basedir}/tomcat7x</installDir>
+ -->
+ <downloadDir>${basedir}/downloads</downloadDir>
+ <extractDir>${basedir}/tomcat7x</extractDir>
+ </zipUrlInstaller>
+ </container>
+ <configuration>
+ <home>${basedir}/target/tomcat7x</home>
+ <properties>
+ <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -Xnoagent -Djava.compiler=NONE</cargo.jvmargs>
+ </properties>
+ </configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${jsf-myfaces.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ </profiles>
+
+</project>
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/
------------------------------------------------------------------------------
bugtraq:number = true
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.example.clientWindow;
+
+import java.io.IOException;
+import javax.faces.component.FacesComponent;
+import javax.faces.component.UINamingContainer;
+import javax.faces.context.FacesContext;
+import javax.faces.lifecycle.ClientWindow;
+
+/**
+ *
+ * @author lu4242
+ */
+@FacesComponent("oam.clientWindow.disable")
+public class DisableClientWindow extends UINamingContainer
+{
+
+ @Override
+ public void encodeBegin(FacesContext context) throws IOException
+ {
+ ClientWindow.disableClientWindowUrlQueryParameter(context);
+ super.encodeBegin(context);
+ }
+
+}
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.example.clientWindow;
+
+import java.io.IOException;
+import javax.faces.component.FacesComponent;
+import javax.faces.component.UINamingContainer;
+import javax.faces.context.FacesContext;
+import javax.faces.lifecycle.ClientWindow;
+
+/**
+ *
+ * @author lu4242
+ */
+@FacesComponent("oam.clientWindow.enable")
+public class EnableClientWindow extends UINamingContainer
+{
+
+ @Override
+ public void encodeBegin(FacesContext context) throws IOException
+ {
+ ClientWindow.enableClientWindowUrlQueryParameter(context);
+ super.encodeBegin(context);
+ }
+}
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/HelloWorldController.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/HelloWorldController.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/HelloWorldController.java (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/HelloWorldController.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.example.clientWindow;
+
+import java.io.Serializable;
+import javax.faces.bean.CustomScoped;
+import javax.faces.bean.ManagedBean;
+
+/**
+ * A typical simple backing bean, that is backed to <code>helloWorld.xhtml</code>
+ */
+@ManagedBean(name = "helloWorld")
+@CustomScoped("#{window}")
+public class HelloWorldController implements Serializable
+{
+
+ //properties
+ private String name;
+
+ /**
+ * default empty constructor
+ */
+ public HelloWorldController()
+ {
+ }
+
+ /**
+ * Method that is backed to a submit button of a form.
+ */
+ public String send()
+ {
+ //do real logic, return a string which will be used for the navigation system of JSF
+ return "page2.xhtml";
+ }
+
+ //-------------------getter & setter
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+}
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/HelloWorldController.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java (from r1366644, myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/FlashBean.java)
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java?p2=myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java&p1=myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/FlashBean.java&r1=1366644&r2=1368982&rev=1368982&view=diff
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/FlashBean.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java Fri Aug 3 14:33:13 2012
@@ -16,10 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.myfaces.flash;
+package org.apache.myfaces.example.flash;
import java.awt.event.ActionEvent;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+@ManagedBean(name="flashBean")
+@RequestScoped
public class FlashBean
{
Copied: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java (from r1366644, myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/HelloWorldFlashBean.java)
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java?p2=myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java&p1=myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/HelloWorldFlashBean.java&r1=1366644&r2=1368982&rev=1368982&view=diff
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/flash/HelloWorldFlashBean.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java Fri Aug 3 14:33:13 2012
@@ -16,9 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.myfaces.flash;
+package org.apache.myfaces.example.flash;
import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.Flash;
@@ -28,6 +30,8 @@ import javax.faces.event.PhaseEvent;
* A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
*
*/
+@ManagedBean(name="helloWorldFlashBean")
+@RequestScoped
public class HelloWorldFlashBean {
//Log log = LogFactory.getLog(HelloWorldFlashBean.class);
Copied: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java (from r1367981, myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/context/flash/SubKeyMap.java)
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java?p2=myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java&p1=myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/context/flash/SubKeyMap.java&r1=1367981&r2=1368982&rev=1368982&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/context/flash/SubKeyMap.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java Fri Aug 3 14:33:13 2012
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.myfaces.shared.context.flash;
+package org.apache.myfaces.example.windowScope;
import java.util.AbstractMap;
import java.util.AbstractSet;
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.example.windowScope;
+
+import java.util.Map;
+
+/**
+ *
+ * @author lu4242
+ */
+public abstract class WindowScope implements Map<String, Object>
+{
+
+
+}
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,260 @@
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.example.windowScope;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Iterator;
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.PropertyNotFoundException;
+import javax.el.PropertyNotWritableException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ * @author lu4242
+ */
+public class WindowScopeELResolver extends ELResolver
+{
+ public static final String WINDOW = "window";
+
+ @Override
+ public void setValue(final ELContext context, final Object base, final Object property, final Object value)
+ {
+ if (property == null)
+ {
+ throw new PropertyNotFoundException();
+ }
+ if (!(property instanceof String))
+ {
+ return;
+ }
+
+ String strProperty = property.toString();
+
+ if (WINDOW.equals(strProperty))
+ {
+ throw new PropertyNotWritableException();
+ }
+ else if (base instanceof WindowScope)
+ {
+ context.setPropertyResolved(true);
+ try
+ {
+ ((WindowScope) base).put(strProperty, value);
+ }
+ catch (UnsupportedOperationException e)
+ {
+ throw new PropertyNotWritableException(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException
+ {
+
+ if (property == null)
+ {
+ throw new PropertyNotFoundException();
+ }
+ if (!(property instanceof String))
+ {
+ return false;
+ }
+
+ String strProperty = property.toString();
+
+ if (WINDOW.equals(strProperty))
+ {
+ context.setPropertyResolved(true);
+ return true;
+ }
+ else if (base instanceof WindowScope)
+ {
+ context.setPropertyResolved(true);
+ }
+
+ return false;
+ }
+
+ @Override
+ public Object getValue(ELContext elContext, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException
+ {
+
+ if (property == null)
+ {
+ throw new PropertyNotFoundException();
+ }
+ if (!(property instanceof String))
+ {
+ return null;
+ }
+
+ String strProperty = property.toString();
+
+ if (base == null)
+ {
+ if (WINDOW.equals(strProperty))
+ {
+ FacesContext facesContext = facesContext(elContext);
+ if (facesContext == null)
+ {
+ return null;
+ }
+ ExternalContext externalContext = facesContext.getExternalContext();
+ if (externalContext == null)
+ {
+ return null;
+ }
+
+ //Access to window object
+ elContext.setPropertyResolved(true);
+ WindowScope window = getScope(facesContext);
+
+ return window;
+ }
+ }
+ else if (base instanceof WindowScope)
+ {
+ FacesContext facesContext = facesContext(elContext);
+ if (facesContext == null)
+ {
+ return null;
+ }
+ ExternalContext externalContext = facesContext.getExternalContext();
+ if (externalContext == null)
+ {
+ return null;
+ }
+ WindowScope window = (WindowScope) base;
+ //Just get the value
+ elContext.setPropertyResolved(true);
+ return window.get(strProperty);
+ }
+ return null;
+ }
+
+ // get the FacesContext from the ELContext
+ protected FacesContext facesContext(ELContext context)
+ {
+ return (FacesContext) context.getContext(FacesContext.class);
+ }
+
+ protected ExternalContext externalContext(ELContext context)
+ {
+ return facesContext(context).getExternalContext();
+ }
+
+ private WindowScope getScope(final FacesContext facesContext)
+ {
+ return WindowScopeImpl.getCurrentInstance(facesContext.getExternalContext());
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException
+ {
+
+ if (property == null)
+ {
+ throw new PropertyNotFoundException();
+ }
+ if (!(property instanceof String))
+ {
+ return null;
+ }
+
+ String strProperty = property.toString();
+
+ if (WINDOW.equals(strProperty))
+ {
+ context.setPropertyResolved(true);
+ }
+ else if (base instanceof WindowScope)
+ {
+ context.setPropertyResolved(true);
+ Object obj = ((WindowScope) base).get(property);
+ return (obj != null) ? obj.getClass() : null;
+ }
+
+ return null;
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
+ Object base)
+ {
+ ArrayList<FeatureDescriptor> descriptors = new ArrayList<FeatureDescriptor>(1);
+
+ descriptors.add(makeDescriptor(WINDOW,
+ "Represents the current flash scope", Object.class));
+
+ if (base instanceof WindowScope)
+ {
+ Iterator itr = ((WindowScope) base).keySet().iterator();
+ Object key;
+ FeatureDescriptor desc;
+ while (itr.hasNext())
+ {
+ key = itr.next();
+ desc = makeDescriptor(key.toString(), key.toString(), key.getClass());
+ descriptors.add(desc);
+ }
+ }
+ return descriptors.iterator();
+ }
+
+ protected FeatureDescriptor makeDescriptor(String name, String description,
+ Class<?> elResolverType)
+ {
+ FeatureDescriptor fd = new FeatureDescriptor();
+ fd.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
+ fd.setValue(ELResolver.TYPE, elResolverType);
+ fd.setName(name);
+ fd.setDisplayName(name);
+ fd.setShortDescription(description);
+ fd.setExpert(false);
+ fd.setHidden(false);
+ fd.setPreferred(true);
+ return fd;
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base)
+ {
+ if (base == null)
+ {
+ return null;
+ }
+
+ if (base instanceof WindowScope)
+ {
+ return Object.class;
+ }
+ else if (WINDOW.equals(base.toString()))
+ {
+ return Object.class;
+ }
+
+ return null;
+ }
+}
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java Fri Aug 3 14:33:13 2012
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2012 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.example.windowScope;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ * @author lu4242
+ */
+public class WindowScopeImpl extends WindowScope
+{
+
+ private static final String WINDOW_PREFIX = "oam.Window";
+
+ /**
+ * Key for the cached render FlashMap instance on the request map.
+ */
+ static final String WINDOW_MAP = WINDOW_PREFIX + ".WINDOWMAP";
+
+ /**
+ * Key on application map to keep current instance
+ */
+ static final String WINDOW_INSTANCE = WINDOW_PREFIX + ".INSTANCE";
+
+ /**
+ * Session map prefix to flash maps
+ */
+ static final String WINDOW_SESSION_MAP_SUBKEY_PREFIX = WINDOW_PREFIX + ".SCOPE";
+
+ /**
+ * Token separator.
+ */
+ static final char SEPARATOR_CHAR = '.';
+
+ public WindowScopeImpl(ExternalContext externalContext)
+ {
+
+ }
+
+ public int size()
+ {
+ return getActiveWindowScopeMap().size();
+ }
+
+ public boolean isEmpty()
+ {
+ return getActiveWindowScopeMap().isEmpty();
+ }
+
+ public boolean containsKey(Object key)
+ {
+ return getActiveWindowScopeMap().containsKey(key);
+ }
+
+ public boolean containsValue(Object value)
+ {
+ return getActiveWindowScopeMap().containsValue(value);
+ }
+
+ public Object get(Object key)
+ {
+ return getActiveWindowScopeMap().get(key);
+ }
+
+ public Object put(String key, Object value)
+ {
+ return getActiveWindowScopeMap().put(key, value);
+ }
+
+ public Object remove(Object key)
+ {
+ return getActiveWindowScopeMap().remove(key);
+ }
+
+ public void putAll(Map<? extends String, ? extends Object> m)
+ {
+ getActiveWindowScopeMap().putAll(m);
+ }
+
+ public void clear()
+ {
+ getActiveWindowScopeMap().clear();
+ }
+
+ public Set<String> keySet()
+ {
+ return getActiveWindowScopeMap().keySet();
+ }
+
+ public Collection<Object> values()
+ {
+ return getActiveWindowScopeMap().values();
+ }
+
+ public Set<Entry<String, Object>> entrySet()
+ {
+ return getActiveWindowScopeMap().entrySet();
+ }
+
+ private Map<String, Object> getActiveWindowScopeMap()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Map<Object, Object> requestMap = context.getAttributes();
+ Map<String, Object> map = (Map<String, Object>) requestMap.get(WINDOW_MAP);
+ if (map == null)
+ {
+ String token = (String) context.getExternalContext().getClientWindow().getId();
+ String fullToken = WINDOW_SESSION_MAP_SUBKEY_PREFIX + SEPARATOR_CHAR + token;
+ map = _createSubKeyMap(context, fullToken);
+ requestMap.put(WINDOW_MAP, map);
+ }
+ return map;
+ }
+
+ /**
+ * Create a new subkey-wrapper of the session map with the given prefix.
+ * This wrapper is used to implement the maps for the flash scope.
+ * For more information see the SubKeyMap doc.
+ */
+ private Map<String, Object> _createSubKeyMap(FacesContext context, String prefix)
+ {
+ ExternalContext external = context.getExternalContext();
+ Map<String, Object> sessionMap = external.getSessionMap();
+
+ return new SubKeyMap<Object>(sessionMap, prefix);
+ }
+
+ public static WindowScope getCurrentInstance(ExternalContext context)
+ {
+ Map<String, Object> applicationMap = context.getApplicationMap();
+
+ WindowScope flash = (WindowScope) applicationMap.get(WINDOW_INSTANCE);
+ if (flash == null)
+ {
+ // synchronize the ApplicationMap to ensure that only
+ // once instance of FlashImpl is created and stored in it.
+ synchronized (applicationMap)
+ {
+ // check again, because first try was un-synchronized
+ flash = (WindowScope) applicationMap.get(WINDOW_INSTANCE);
+ if (flash == null)
+ {
+ flash = new WindowScopeImpl(context);
+ applicationMap.put(WINDOW_INSTANCE, flash);
+ }
+ }
+ }
+
+ return flash;
+ }
+}
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/resources/
------------------------------------------------------------------------------
bugtraq:number = true
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/templates/example.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/templates/example.xhtml?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/templates/example.xhtml (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/templates/example.xhtml Fri Aug 3 14:33:13 2012
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<h:head>
+ <title>Hello World</title>
+</h:head>
+<h:body>
+ <h:outputStylesheet name="style.css" library="css"/>
+ <div id="container">
+ <ui:insert name="container"/>
+ <br/>
+ <br/>
+ <h:link outcome="home" value="Index"/>
+ </div>
+</h:body>
+</html>
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/META-INF/templates/example.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/faces-config.xml?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/faces-config.xml Fri Aug 3 14:33:13 2012
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<faces-config version="2.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
+
+ <application>
+ <el-resolver>org.apache.myfaces.example.windowScope.WindowScopeELResolver</el-resolver>
+ </application>
+
+ <!-- navigation rules for helloWorld flash post-redirect-get pattern -->
+ <navigation-rule>
+ <from-view-id>/flashprg1.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/flashprg2.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/flashprg2.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>back</from-outcome>
+ <to-view-id>/flashprg1.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- navigation rules for helloWorld flash using putNow/keep method to keep previous name -->
+ <navigation-rule>
+ <from-view-id>/flashhw1.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/flashhw2.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/flashhw2.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>back</from-outcome>
+ <to-view-id>/flashhw1.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
+
\ No newline at end of file
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/web.xml?rev=1368982&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/web.xml Fri Aug 3 14:33:13 2012
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <description>MyProject web.xml</description>
+
+ <!-- JSF standard parameters -->
+ <context-param>
+ <description>Project stage for the application (new in 2.0). Expects one of
+ the following values: Development, Production, SystemTest, UnitTest
+ </description>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <description>
+ If this parameter is set to true and the submitted value of a component is
+ the empty string, the submitted value will be set to null
+ </description>
+ <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <description>Define the state method to be used. There are two different options
+ defined by the specification: 'client' and 'server' state.</description>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CLIENT_WINDOW_MODE</param-name>
+ <param-value>default</param-value>
+ </context-param>
+
+ <!-- MyFaces specific parameters -->
+ <!-- See http://myfaces.apache.org/docindex.html for documentation
+ about MyFaces Projects -->
+ <!-- See http://myfaces.apache.org/core21/myfaces-impl/webconfig.html
+ for an updated list of web config parameters for MyFaces Core
+ See http://wiki.apache.org/myfaces/Secure_Your_Application
+ for instructions about how to secure your web application -->
+ <context-param>
+ <description>Only applicable if state saving method is "server" (= default).
+ Defines the amount (default = 20) of the latest views are stored in session.</description>
+ <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
+ <param-value>2</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION</param-name>
+ <param-value>1</param-value>
+ </context-param>
+ <context-param>
+ <description>Only applicable if state saving method is "server" (= default).
+ If true (default) the state will be serialized to a byte stream before it
+ is written to the session.
+ If false the state will not be serialized to a byte stream.</description>
+ <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Only applicable if state saving method is "server" (= default) and if
+ org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default)
+ If true (default) the serialized state will be compressed before it
+ is written to the session. If false the state will not be compressed.</description>
+ <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Defines which packages to scan for beans, separated by commas.
+ Useful for when using maven and jetty:run (version 6) or tomcat:run
+ </description>
+ <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
+ <param-value>org.apache.myfaces.example</param-value>
+ </context-param>
+
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <!-- Welcome files -->
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Propchange: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native