Author: lu4242 Date: Tue Mar 26 20:05:11 2013 New Revision: 1461294 URL: http://svn.apache.org/r1461294 Log: MYFACES-3588 window-id support (latest updates until final draft 2) Added: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowFactory.java (with props) myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowWrapper.java (with props) Modified: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/FactoryFinder.java myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindow.java Modified: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/FactoryFinder.java URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/FactoryFinder.java?rev=1461294&r1=1461293&r2=1461294&view=diff ============================================================================== --- myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/FactoryFinder.java (original) +++ myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/FactoryFinder.java Tue Mar 26 20:05:11 2013 @@ -37,6 +37,7 @@ import javax.faces.context.FacesContextF import javax.faces.context.FlashFactory; import javax.faces.context.PartialViewContextFactory; import javax.faces.flow.FlowHandlerFactory; +import javax.faces.lifecycle.ClientWindowFactory; import javax.faces.lifecycle.LifecycleFactory; import javax.faces.render.RenderKitFactory; import javax.faces.view.ViewDeclarationLanguageFactory; @@ -64,6 +65,7 @@ public final class FactoryFinder public static final String FACELET_CACHE_FACTORY = "javax.faces.view.facelets.FaceletCacheFactory"; public static final String FLASH_FACTORY = "javax.faces.context.FlashFactory"; public static final String FLOW_HANDLER_FACTORY = "javax.faces.flow.FlowHandlerFactory"; + public static final String CLIENT_WINDOW_FACTORY = "javax.faces.lifecycle.ClientWindowFactory"; /** * used as a monitor for itself and _factories. Maps in this map are used as monitors for themselves and the @@ -102,6 +104,7 @@ public final class FactoryFinder VALID_FACTORY_NAMES.add(FACELET_CACHE_FACTORY); VALID_FACTORY_NAMES.add(FLASH_FACTORY); VALID_FACTORY_NAMES.add(FLOW_HANDLER_FACTORY); + VALID_FACTORY_NAMES.add(CLIENT_WINDOW_FACTORY); ABSTRACT_FACTORY_CLASSES.put(APPLICATION_FACTORY, ApplicationFactory.class); ABSTRACT_FACTORY_CLASSES.put(EXCEPTION_HANDLER_FACTORY, ExceptionHandlerFactory.class); @@ -116,6 +119,7 @@ public final class FactoryFinder ABSTRACT_FACTORY_CLASSES.put(FACELET_CACHE_FACTORY, FaceletCacheFactory.class); ABSTRACT_FACTORY_CLASSES.put(FLASH_FACTORY, FlashFactory.class); ABSTRACT_FACTORY_CLASSES.put(FLOW_HANDLER_FACTORY, FlowHandlerFactory.class); + ABSTRACT_FACTORY_CLASSES.put(CLIENT_WINDOW_FACTORY, ClientWindowFactory.class); try { ClassLoader classLoader; Modified: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindow.java URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindow.java?rev=1461294&r1=1461293&r2=1461294&view=diff ============================================================================== --- myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindow.java (original) +++ myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindow.java Tue Mar 26 20:05:11 2013 @@ -41,19 +41,19 @@ public abstract class ClientWindow public abstract Map getQueryURLParameters(FacesContext context); - public static boolean isClientWindowRenderModeEnabled(FacesContext context) + public boolean isClientWindowRenderModeEnabled(FacesContext context) { // By default is enabled, so it is easier to check the opposite. return !Boolean.TRUE.equals( context.getAttributes().get(CLIENT_WINDOW_RENDER_MODE_DISABLED)); } - public static void disableClientWindowRenderMode(FacesContext context) + public void disableClientWindowRenderMode(FacesContext context) { context.getAttributes().put(CLIENT_WINDOW_RENDER_MODE_DISABLED, Boolean.TRUE); } - public static void enableClientWindowRenderMode(FacesContext context) + public void enableClientWindowRenderMode(FacesContext context) { context.getAttributes().put(CLIENT_WINDOW_RENDER_MODE_DISABLED, Boolean.FALSE); } Added: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowFactory.java URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowFactory.java?rev=1461294&view=auto ============================================================================== --- myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowFactory.java (added) +++ myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowFactory.java Tue Mar 26 20:05:11 2013 @@ -0,0 +1,37 @@ +/* + * 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.FacesWrapper; +import javax.faces.context.FacesContext; + +/** + * + * @since 2.2 + */ +public abstract class ClientWindowFactory implements FacesWrapper +{ + + public ClientWindowFactory getWrapped() + { + return null; + } + + public abstract ClientWindow getClientWindow(FacesContext context); +} Propchange: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowFactory.java ------------------------------------------------------------------------------ svn:eol-style = native Added: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowWrapper.java URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowWrapper.java?rev=1461294&view=auto ============================================================================== --- myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowWrapper.java (added) +++ myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowWrapper.java Tue Mar 26 20:05:11 2013 @@ -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 java.util.Map; +import javax.faces.FacesWrapper; +import javax.faces.context.FacesContext; + +/** + * + * @since 2.2 + */ +public abstract class ClientWindowWrapper extends ClientWindow + implements FacesWrapper +{ + + public void decode(FacesContext context) + { + getWrapped().decode(context); + } + + public String getId() + { + return getWrapped().getId(); + } + + public Map getQueryURLParameters(FacesContext context) + { + return getWrapped().getQueryURLParameters(context); + } + + public boolean isClientWindowRenderModeEnabled(FacesContext context) + { + return getWrapped().isClientWindowRenderModeEnabled(context); + } + + public void disableClientWindowRenderMode(FacesContext context) + { + getWrapped().disableClientWindowRenderMode(context); + } + + public void enableClientWindowRenderMode(FacesContext context) + { + getWrapped().enableClientWindowRenderMode(context); + } + + public abstract ClientWindow getWrapped(); + +} Propchange: myfaces/core/branches/2.2.x/api/src/main/java/javax/faces/lifecycle/ClientWindowWrapper.java ------------------------------------------------------------------------------ svn:eol-style = native