You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by jw...@apache.org on 2007/01/31 03:42:08 UTC
svn commit: r501713 -
/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java
Author: jwaldman
Date: Tue Jan 30 19:42:07 2007
New Revision: 501713
URL: http://svn.apache.org/viewvc?view=rev&rev=501713
Log:
revert the patch to http://issues.apache.org/jira/browse/ADFFACES-364
PartialPageContext optimization bug
Modified:
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java
Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java?view=diff&rev=501713&r1=501712&r2=501713
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java (original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java Tue Jan 30 19:42:07 2007
@@ -1,12 +1,12 @@
/*
* Copyright 2005,2006 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.
@@ -64,7 +64,7 @@
RequestContext afContext = RequestContext.getCurrentInstance();
_properties = new HashMap<Object, Object>();
-
+
_outputMode = afContext.getOutputMode();
_agent = _initializeAgent(context, afContext.getAgent(), _outputMode);
@@ -370,9 +370,9 @@
String skinFamily = afContext.getSkinFamily();
if (skinFamily == null)
skinFamily = getDefaultSkinFamily();
-
+
// get renderKitId, default is desktop renderKit
- String renderKitId = XhtmlConstants.APACHE_TRINIDAD_DESKTOP;
+ String renderKitId = XhtmlConstants.APACHE_TRINIDAD_DESKTOP;
if (CoreRenderKit.OUTPUT_MODE_PORTLET.equals(getOutputMode()))
{
renderKitId = XhtmlConstants.APACHE_TRINIDAD_PORTLET;
@@ -383,7 +383,7 @@
// get rid of this bit of code. Should we use getViewRoot().getRenderKitId() instead?
renderKitId = XhtmlConstants.APACHE_TRINIDAD_PDA;
}
-
+
SkinFactory factory = SkinFactory.getFactory();
if (factory == null)
@@ -392,9 +392,9 @@
_LOG.warning("There is no SkinFactory");
return;
}
-
+
Skin skin = null;
-
+
// see if there is a skinID on the requestParameterMap. If there is, then
// we want to use that skin. Otherwise, use find the skin as usual, using the portlet
// renderKitId.
@@ -406,7 +406,7 @@
{
skin = factory.getSkin(context, skinId.toString());
}
-
+
}
if (skin == null)
@@ -451,7 +451,7 @@
}
else if (CoreRenderKit.OUTPUT_MODE_PORTLET.equals(outputMode))
{
- return AgentUtil.mergeCapabilities(agent, _PORTLET_CAPABILITIES);
+ return AgentUtil.mergeCapabilities(agent, _PORTLET_CAPABILITIES);
}
else
{
@@ -466,13 +466,9 @@
FacesContext fContext,
RequestContext context)
{
- //There used to be an optimization here which would simply return when
- //the PartialRendering capabilities were disabled. This was removed
- //because it is possible for extensions to Trinidad to support PPR in a
- //container-specific way in a Portal Environment even though such capability
- //is off by default. Furthermore, the check on whether something is a
- //PPR request or not is very efficient, so there is very little time saved
- //by the optimization.
+ // Don't bother if PPR isn't even supported
+ if (!CoreRendererUtils.supportsPartialRendering(this))
+ return;
PartialPageContext partialPageContext =
PartialPageUtils.createPartialPageContext(fContext,
@@ -490,9 +486,9 @@
{
String path = null;
- Map<String, Object> applicationMap =
+ Map<String, Object> applicationMap =
fContext.getExternalContext().getApplicationMap();
-
+
if (applicationMap != null)
{
// In general, write to the Servlet spec'd temporary directory
@@ -577,19 +573,19 @@
static private final String _SKIN_ID_PARAM = "oracle.apache.myfaces.trinidad.skin.id";
// Maps describing the capabilities of our output modes
// -= Simon Lessard =-
- // FIXME: Cannot use CapabilityKey in the generic definition because
- // CapabilityKey is not in the public API and those map are
- // used as a parameter in an API call receiving a
+ // FIXME: Cannot use CapabilityKey in the generic definition because
+ // CapabilityKey is not in the public API and those map are
+ // used as a parameter in an API call receiving a
// Map<Object, Object> argument
- static private final Map<Object, Object> _PRINTABLE_CAPABILITIES =
+ static private final Map<Object, Object> _PRINTABLE_CAPABILITIES =
new HashMap<Object, Object>();
-
- static private final Map<Object, Object> _EMAIL_CAPABILITIES =
+
+ static private final Map<Object, Object> _EMAIL_CAPABILITIES =
new HashMap<Object, Object>();
-
- static private final Map<Object, Object> _PORTLET_CAPABILITIES =
+
+ static private final Map<Object, Object> _PORTLET_CAPABILITIES =
new HashMap<Object, Object>();
-
+
static
{
_PRINTABLE_CAPABILITIES.put(TrinidadAgent.CAP_INTRINSIC_EVENTS,
@@ -616,7 +612,7 @@
TrinidadAgent.STYLES_INTERNAL);
_EMAIL_CAPABILITIES.put(TrinidadAgent.CAP_PARTIAL_RENDERING,
Boolean.FALSE);
-
+
_PORTLET_CAPABILITIES.put(TrinidadAgent.CAP_PARTIAL_RENDERING,
Boolean.FALSE);
_PORTLET_CAPABILITIES.put(TrinidadAgent.CAP_MULTIPLE_WINDOWS,