[2/2] git commit: DELTASPIKE-503 cosmetics
DELTASPIKE-503 cosmetics Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/190f9982 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/190f9982 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/190f9982 Branch: refs/heads/master Commit: 190f9982c582ee0dc79b0bc4879a633b31666a4e Parents: fdbe13c Author: tandraschko tandrasc...@apache.org Authored: Sun Feb 2 22:49:51 2014 +0100 Committer: tandraschko tandrasc...@apache.org Committed: Sun Feb 2 22:49:51 2014 +0100 -- .../webapp/views/windowhandling/lazy/testWithoutJS.xhtml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/190f9982/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/lazy/testWithoutJS.xhtml -- diff --git a/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/lazy/testWithoutJS.xhtml b/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/lazy/testWithoutJS.xhtml index 7254b33..7d6d13e 100644 --- a/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/lazy/testWithoutJS.xhtml +++ b/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/lazy/testWithoutJS.xhtml @@ -36,6 +36,11 @@ h:link value=GET Link outcome=test.xhtml / br / br / +ds:disableClientWindow +h:link value=GET Link - surrounded by ds:disableClientWindow outcome=test.xhtml / +/ds:disableClientWindow +br / +br / h:commandLink value=Postback /h:commandLink br / @@ -52,11 +57,6 @@ h:commandLink value=AJAX Postback with outcome action=test.xhtml?faces-redirect=true f:ajax render=@form execute=@this / /h:commandLink -br / -br / -ds:disableClientWindow -h:link value=Simple Link - surrounded by ds:disableClientWindow outcome=test.xhtml / -/ds:disableClientWindow /h:form /h:body
git commit: DELTASPIKE-502 fixed unit tests and initial redirect
Updated Branches: refs/heads/master 65d3d9d0c - 9166490a5 DELTASPIKE-502 fixed unit tests and initial redirect Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/9166490a Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/9166490a Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/9166490a Branch: refs/heads/master Commit: 9166490a55c74d4aa371080c85647420172f9f1a Parents: 65d3d9d Author: tandraschko tandrasc...@apache.org Authored: Wed Jan 22 21:13:50 2014 +0100 Committer: tandraschko tandrasc...@apache.org Committed: Wed Jan 22 21:13:50 2014 +0100 -- .../impl/scope/window/DefaultClientWindow.java | 91 +++- .../jsf/impl/util/ClientWindowHelper.java | 36 .../deltaspike/jsf/impl/util/JsfUtils.java | 5 ++ .../jsf/impl/config/TestJsfModuleConfig.java| 3 +- 4 files changed, 76 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/9166490a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java index 1bad3f0..531a2dc 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java @@ -90,6 +90,8 @@ public class DefaultClientWindow implements ClientWindow */ private static final String DEFAULT_WINDOW_ID = default; +private static final String WINDOW_ID_REQUEST_MAP_KEY = +ClientWindow.class.getName() + .WindowId; @Inject private ClientWindowConfig clientWindowConfig; @@ -104,23 +106,29 @@ public class DefaultClientWindow implements ClientWindow @Override public String getWindowId(FacesContext facesContext) { +ExternalContext externalContext = facesContext.getExternalContext(); +MapString, Object requestMap = externalContext.getRequestMap(); + +// try to lookup from cache +String windowId = (String) requestMap.get(WINDOW_ID_REQUEST_MAP_KEY); +if (windowId != null) +{ +return windowId; +} + ClientWindowRenderMode clientWindowRenderMode = clientWindowConfig.getClientWindowRenderMode(facesContext); if (ClientWindowRenderMode.NONE.equals(clientWindowRenderMode)) { // if this request should not get any window detection then we are done -return DEFAULT_WINDOW_ID; +windowId = DEFAULT_WINDOW_ID; } - -if (ClientWindowRenderMode.DELEGATED.equals(clientWindowRenderMode)) +else if (ClientWindowRenderMode.DELEGATED.equals(clientWindowRenderMode)) { -return ClientWindowAdapter.getWindowIdFromJsf(facesContext); +windowId = ClientWindowAdapter.getWindowIdFromJsf(facesContext); } - -if (ClientWindowRenderMode.LAZY.equals(clientWindowRenderMode)) +else if (ClientWindowRenderMode.LAZY.equals(clientWindowRenderMode)) { -ExternalContext externalContext = facesContext.getExternalContext(); - -String windowId = ClientWindowHelper.getInitialRedirectWindowId(facesContext); +windowId = ClientWindowHelper.getInitialRedirectWindowId(facesContext); if (StringUtils.isEmpty(windowId)) { @@ -133,51 +141,54 @@ public class DefaultClientWindow implements ClientWindow { ClientWindowHelper.handleInitialRedirect(facesContext, generateNewWindowId()); facesContext.responseComplete(); -return null; +windowId = null; } else { -return generateNewWindowId(); +windowId = generateNewWindowId(); } } - -return windowId; -} - -if (facesContext.isPostback()) -{ -return getPostBackWindowId(facesContext); } - -ExternalContext externalContext = facesContext.getExternalContext(); - -// and now for the GET request stuff -if (isNoscriptRequest(externalContext)) +else if (ClientWindowRenderMode.CLIENTWINDOW.equals(clientWindowRenderMode)) { -// the client has JavaScript disabled -clientWindowConfig.setJavaScriptEnabled
git commit: DELTASPIKE-502 added client side logic
Updated Branches: refs/heads/master 895c6f00e - 1ee1d9cbf DELTASPIKE-502 added client side logic Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/1ee1d9cb Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/1ee1d9cb Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/1ee1d9cb Branch: refs/heads/master Commit: 1ee1d9cbf645abb9f7830867b336438d92a35201 Parents: 895c6f0 Author: tandraschko tandrasc...@apache.org Authored: Sun Jan 19 12:53:19 2014 +0100 Committer: tandraschko tandrasc...@apache.org Committed: Sun Jan 19 12:53:19 2014 +0100 -- .../component/window/WindowIdHtmlRenderer.java | 22 - .../impl/scope/window/DefaultClientWindow.java | 5 +-- .../resources/deltaspike/windowhandler.js | 33 +--- .../main/resources/static/windowhandler.html| 2 +- 4 files changed, 47 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/1ee1d9cb/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/component/window/WindowIdHtmlRenderer.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/component/window/WindowIdHtmlRenderer.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/component/window/WindowIdHtmlRenderer.java index 8ef0645..c5297bb 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/component/window/WindowIdHtmlRenderer.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/component/window/WindowIdHtmlRenderer.java @@ -29,6 +29,7 @@ import java.io.IOException; import org.apache.deltaspike.core.api.provider.BeanProvider; import org.apache.deltaspike.core.spi.scope.window.WindowContext; +import org.apache.deltaspike.jsf.spi.scope.window.ClientWindowConfig; @FacesRenderer(componentFamily = WindowIdComponent.COMPONENT_FAMILY, rendererType = WindowIdComponent.COMPONENT_TYPE) @ResourceDependencies( { @@ -37,6 +38,7 @@ import org.apache.deltaspike.core.spi.scope.window.WindowContext; public class WindowIdHtmlRenderer extends Renderer { private volatile WindowContext windowContext; +private volatile ClientWindowConfig clientWindowConfig; /** * 'deltaspikeJsWindowId' will be used to: @@ -52,11 +54,13 @@ public class WindowIdHtmlRenderer extends Renderer super.encodeBegin(context, component); String windowId = getWindowContext().getCurrentWindowId(); +String mode = getClientWindowConfig().getClientWindowRenderMode(context).name(); ResponseWriter writer = context.getResponseWriter(); writer.startElement(script, component); writer.writeAttribute(type, text/javascript, null); -writer.write(window.deltaspikeJsWindowId= + windowId + ;); +writer.write(window.deltaspikeWindowId=' + windowId + ';); +writer.write(window.deltaspikeClientWindowRenderMode=' + mode + ';); writer.endElement(script); } @@ -76,4 +80,20 @@ public class WindowIdHtmlRenderer extends Renderer return windowContext; } + +private ClientWindowConfig getClientWindowConfig() +{ +if (clientWindowConfig == null) +{ +synchronized (this) +{ +if (clientWindowConfig == null) +{ +clientWindowConfig = BeanProvider.getContextualReference(ClientWindowConfig.class); +} +} +} + +return clientWindowConfig; +} } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/1ee1d9cb/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java index 3b5fc47..71c0852 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java @@ -36,6 +36,7 @@ import java.io.OutputStream; import java.util.HashMap; import java.util.Map; import java.util.Random; +import org.apache.deltaspike.core.util.StringUtils; import static org.apache.deltaspike.jsf.spi.scope.window.ClientWindowConfig.ClientWindowRenderMode; @@ -117,12 +118,12 @@ public class DefaultClientWindow implements ClientWindow String windowId = (String
git commit: DELTASPIKE-499 added javascript compression
Updated Branches: refs/heads/master 6ba170c3b - c6867450a DELTASPIKE-499 added javascript compression Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/c6867450 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/c6867450 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/c6867450 Branch: refs/heads/master Commit: c6867450aa08f41a83867ba090010a9664beaf49 Parents: 6ba170c Author: tandraschko tandrasc...@apache.org Authored: Sun Jan 19 23:21:32 2014 +0100 Committer: tandraschko tandrasc...@apache.org Committed: Sun Jan 19 23:21:32 2014 +0100 -- deltaspike/modules/jsf/impl/pom.xml | 51 +++ .../resource/DeltaSpikeResourceHandler.java | 66 .../main/resources/META-INF/faces-config.xml| 1 + 3 files changed, 118 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c6867450/deltaspike/modules/jsf/impl/pom.xml -- diff --git a/deltaspike/modules/jsf/impl/pom.xml b/deltaspike/modules/jsf/impl/pom.xml index e34d9c7..02ed843 100644 --- a/deltaspike/modules/jsf/impl/pom.xml +++ b/deltaspike/modules/jsf/impl/pom.xml @@ -31,6 +31,57 @@ nameApache DeltaSpike JSF-Module Impl/name +build +plugins +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-resources-plugin/artifactId +version2.6/version +executions +execution + phaseprocess-resources/phase + goals + goalcopy-resources/goal + /goals +configuration +includeEmptyDirstrue/includeEmptyDirs + outputDirectory${project.build.directory}/classes/META-INF/resources/deltaspike-uncompressed/outputDirectory +resources +resource + directory${project.build.directory}/classes/META-INF/resources/deltaspike/directory +/resource +/resources +/configuration +/execution +/executions +/plugin +plugin +groupIdorg.primefaces.extensions/groupId +artifactIdresources-optimizer-maven-plugin/artifactId +version1.0.0/version +executions +execution +phasecompile/phase +goals +goaloptimize/goal +/goals +/execution +/executions +configuration + inputDir${project.build.directory}/classes/META-INF/resources/deltaspike//inputDir +resourceSets +resourcesSet +includes +include**/*.js/include +include**/*.css/include +/includes +/resourcesSet +/resourceSets +/configuration +/plugin +/plugins +/build + dependencies dependency groupIdorg.apache.deltaspike.core/groupId http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c6867450/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/resource/DeltaSpikeResourceHandler.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/resource/DeltaSpikeResourceHandler.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/resource/DeltaSpikeResourceHandler.java new file mode 100644 index 000..c6ce502 --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/resource/DeltaSpikeResourceHandler.java @@ -0,0 +1,66 @@ +/* + * 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
git commit: DELTASPIKE-503 added skeleton
Updated Branches: refs/heads/master 0f0150efe - b0251ee16 DELTASPIKE-503 added skeleton Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/b0251ee1 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/b0251ee1 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/b0251ee1 Branch: refs/heads/master Commit: b0251ee16bfc7be945261a0b5da8938409d1979d Parents: 0f0150e Author: tommy tommy@tommy-notebook Authored: Thu Jan 16 19:23:32 2014 +0100 Committer: tommy tommy@tommy-notebook Committed: Thu Jan 16 19:23:32 2014 +0100 -- deltaspike/examples/jsf-playground/pom.xml | 118 +++ .../src/main/resources/META-INF/beans.xml | 23 .../src/main/webapp/WEB-INF/beans.xml | 23 .../src/main/webapp/WEB-INF/faces-config.xml| 25 .../src/main/webapp/WEB-INF/web.xml | 41 +++ .../jsf-playground/src/main/webapp/index.xhtml | 37 ++ 6 files changed, 267 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/b0251ee1/deltaspike/examples/jsf-playground/pom.xml -- diff --git a/deltaspike/examples/jsf-playground/pom.xml b/deltaspike/examples/jsf-playground/pom.xml new file mode 100644 index 000..e4cfb10 --- /dev/null +++ b/deltaspike/examples/jsf-playground/pom.xml @@ -0,0 +1,118 @@ +?xml version=1.0 encoding=UTF-8? +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; +!-- +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. +-- +modelVersion4.0.0/modelVersion + +parent +groupIdorg.apache.deltaspike.examples/groupId +artifactIdexamples-project/artifactId +version0.6-SNAPSHOT/version +/parent + +artifactIddeltaspike-jsf-playground/artifactId + +nameApache DeltaSpike JSF Playground/name + +packagingwar/packaging + +properties +deploy.skiptrue/deploy.skip +/properties + +profiles +profile +!-- + * Run it with: mvn clean package tomee:run -PtomeeConfig + * + * For debugging add: -Dopenejb.server.debug=true + * + * The application can be browsed under http://localhost:8080/ds + -- +idtomeeConfig/id +build +defaultGoalinstall/defaultGoal +plugins +plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-compiler-plugin/artifactId +version3.0/version +configuration +source1.6/source +target1.6/target +/configuration +/plugin +plugin +groupIdorg.apache.openejb.maven/groupId +artifactIdtomee-maven-plugin/artifactId +version1.0.1/version +configuration +tomeeVersion${tomee.version}/tomeeVersion +/configuration + +/plugin +/plugins +/build +/profile + +/profiles + +dependencies + +dependency +groupIdorg.apache.myfaces.core/groupId +artifactIdmyfaces-api/artifactId +version${myfaces2.version}/version +scopeprovided/scope +/dependency + +!-- DeltaSpike modules -- +dependency +groupIdorg.apache.deltaspike.core/groupId +artifactIddeltaspike-core-api/artifactId +scopecompile/scope +/dependency + +dependency +groupIdorg.apache.deltaspike.core/groupId +artifactIddeltaspike-core-impl/artifactId +scopecompile/scope +
git commit: DELTASPIKE-503 added skeleton
Updated Branches: refs/heads/master b0251ee16 - 504dfa564 DELTASPIKE-503 added skeleton Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/504dfa56 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/504dfa56 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/504dfa56 Branch: refs/heads/master Commit: 504dfa564e4b907e149061edf49b199c361f793a Parents: b0251ee Author: tandraschko tandrasc...@apache.org Authored: Thu Jan 16 19:30:48 2014 +0100 Committer: tandraschko tandrasc...@apache.org Committed: Thu Jan 16 19:30:48 2014 +0100 -- deltaspike/examples/pom.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/504dfa56/deltaspike/examples/pom.xml -- diff --git a/deltaspike/examples/pom.xml b/deltaspike/examples/pom.xml index 851da80..69816b1 100644 --- a/deltaspike/examples/pom.xml +++ b/deltaspike/examples/pom.xml @@ -35,8 +35,9 @@ modules modulejse-examples/module - modulejsf-examples/module -/modules + modulejsf-examples/module +modulejsf-playground/module + /modules properties deploy.skipfalse/deploy.skip @@ -73,5 +74,4 @@ /plugin /plugins /build -/project - +/project \ No newline at end of file
[1/4] git commit: Prototype for DELTASPIKE-454
Updated Branches: refs/heads/master 2a8b6d0a5 - 9133bc44b Prototype for DELTASPIKE-454 Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/c156d05d Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/c156d05d Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/c156d05d Branch: refs/heads/master Commit: c156d05d8a9cad30a0d3860749091a36d2d9926c Parents: 2a8b6d0 Author: andraschko andrasc...@dev-4.ifvuf.de Authored: Wed Jan 8 18:23:30 2014 +0100 Committer: andraschko andrasc...@dev-4.ifvuf.de Committed: Wed Jan 8 18:23:30 2014 +0100 -- .../jsf/spi/scope/window/ClientWindow.java | 74 +++- .../spi/scope/window/ClientWindowConfig.java| 2 + .../DeltaSpikeExternalContextWrapper.java | 4 +- .../impl/scope/window/ClientWindowHelper.java | 99 .../impl/scope/window/DefaultClientWindow.java | 117 +-- .../deltaspike/jsf/impl/util/JsfUtils.java | 96 ++- .../jsf/impl/view/DeltaSpikeViewHandler.java| 7 ++ 7 files changed, 383 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c156d05d/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindow.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindow.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindow.java index d272f33..dba12c9 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindow.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindow.java @@ -18,6 +18,7 @@ */ package org.apache.deltaspike.jsf.spi.scope.window; +import java.util.Map; import javax.faces.context.FacesContext; /** @@ -33,8 +34,10 @@ import javax.faces.context.FacesContext; * ClientWindow instances are most likely #064;ApplicationScoped. * /p */ -public interface ClientWindow +public abstract class ClientWindow { +private static final String PER_USE_CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED_KEY = +ClientWindow.class.getName() + .ClientWindowRenderModeEnablement; /** * Extract the windowId for the current request. @@ -47,5 +50,72 @@ public interface ClientWindow * @param facesContext for the request * @return the extracted WindowId of the Request, or codenull/code if there is no window assigned. */ -String getWindowId(FacesContext facesContext); +public abstract String getWindowId(FacesContext facesContext); + +/** + * pComponents that permit per-use disabling + * of the appending of the ClientWindow in generated URLs must call this method + * first before rendering those URLs. The caller must call + * {@link #enableClientWindowRenderMode(javax.faces.context.FacesContext)} + * from a codefinally/code block after rendering the URL. If + * {@link #CLIENT_WINDOW_MODE_PARAM_NAME} is url without the quotes, all generated + * URLs that cause a GET request must append the ClientWindow by default. + * This is specified as a static method because callsites need to access it + * without having access to an actual {@code ClientWindow} instance./p + * + * @param context the {@link FacesContext} for this request. + */ +public void disableClientWindowRenderMode(FacesContext context) +{ +MapObject, Object attrMap = context.getAttributes(); +attrMap.put(PER_USE_CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED_KEY, Boolean.TRUE); +} + +/** + * pComponents that permit per-use disabling + * of the appending of the ClientWindow in generated URLs must call this method + * first after rendering those URLs. If + * {@link #CLIENT_WINDOW_MODE_PARAM_NAME} is url without the quotes, all generated + * URLs that cause a GET request must append the ClientWindow by default. + * This is specified as a static method because callsites need to access it + * without having access to an actual {@code ClientWindow} instance./p + * + * @param context the {@link FacesContext} for this request. + */ +public void enableClientWindowRenderMode(FacesContext context) +{ +MapObject, Object attrMap = context.getAttributes(); +attrMap.remove(PER_USE_CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED_KEY); +} + +/** + * pMethods that append the ClientWindow to generated + * URLs must call this method to see if they are permitted to do so. If + * {@link #CLIENT_WINDOW_MODE_PARAM_NAME} is url without the quotes, all generated + *
[2/2] git commit: Merge origin/master
Merge origin/master Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/f4bada5b Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/f4bada5b Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/f4bada5b Branch: refs/heads/master Commit: f4bada5b4827f20fc2638de165530331c0772776 Parents: d64c6d5 85bbd3c Author: Thomas Andraschko andrasc...@dev-4.ifvuf.de Authored: Thu Jan 9 14:15:11 2014 +0100 Committer: Thomas Andraschko andrasc...@dev-4.ifvuf.de Committed: Thu Jan 9 14:15:11 2014 +0100 -- .../deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --