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 2013/11/16 02:41:10 UTC
svn commit: r1542444 [1/2] - in
/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces: application/
cdi/util/ component/visit/ config/ config/annotation/ context/
context/servlet/ flow/ flow/cdi/ lifecycle/ renderkit/html/ util/
view/facelets/ view...
Author: lu4242
Date: Sat Nov 16 01:41:08 2013
New Revision: 1542444
URL: http://svn.apache.org/r1542444
Log:
MYFACES-3822 General cleanup and remove unused web config params
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/cdi/util/BeanProvider.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/component/visit/PartialVisitContext.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopedContextImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceManager.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/_ComponentUtils.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/MetaRulesetImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentDefinitionTagHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/FacetHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/PassthroughRuleImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/ForEachHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/IfHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/util/ParameterCheck.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/util/Path.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java Sat Nov 16 01:41:08 2013
@@ -323,7 +323,7 @@ public class ApplicationImpl extends App
if (_validatorClassMap.containsKey(validatorId))
{
Class<? extends Validator> validatorClass =
- getObjectFromClassMap(validatorId, _validatorClassMap, Validator.class);
+ getObjectFromClassMap(validatorId, _validatorClassMap);
// Ensure atomicity between _defaultValidatorsIds and _cachedDefaultValidatorsIds
synchronized(_defaultValidatorsIds)
@@ -1183,7 +1183,7 @@ public class ApplicationImpl extends App
checkEmpty(behaviorId, "behaviorId");
final Class<? extends Behavior> behaviorClass =
- getObjectFromClassMap(behaviorId, _behaviorClassMap, Behavior.class);
+ getObjectFromClassMap(behaviorId, _behaviorClassMap);
if (behaviorClass == null)
{
@@ -1428,7 +1428,7 @@ public class ApplicationImpl extends App
checkEmpty(componentType, "componentType");
final Class<? extends UIComponent> componentClass =
- getObjectFromClassMap(componentType, _componentClassMap, UIComponent.class);
+ getObjectFromClassMap(componentType, _componentClassMap);
if (componentClass == null)
{
log.log(Level.SEVERE, "Undefined component type " + componentType);
@@ -1455,7 +1455,7 @@ public class ApplicationImpl extends App
checkEmpty(componentType, "componentType");
final Class<? extends UIComponent> componentClass =
- getObjectFromClassMap(componentType, _componentClassMap, UIComponent.class);
+ getObjectFromClassMap(componentType, _componentClassMap);
if (componentClass == null)
{
log.log(Level.SEVERE, "Undefined component type " + componentType);
@@ -1525,7 +1525,7 @@ public class ApplicationImpl extends App
checkEmpty(converterId, "converterId");
final Class<? extends Converter> converterClass =
- getObjectFromClassMap(converterId, _converterIdToClassMap, Converter.class);
+ getObjectFromClassMap(converterId, _converterIdToClassMap);
if (converterClass == null)
{
throw new FacesException("Could not find any registered converter-class by converterId : " + converterId);
@@ -1819,14 +1819,11 @@ public class ApplicationImpl extends App
}
//if we're in production and the list is not yet cached, store it
- if(context.isProjectStage(ProjectStage.Production) && !isCachedList)
+ if(context.isProjectStage(ProjectStage.Production) && !isCachedList && dependencyList != null)
{
- // Note at this point listenerForList cannot be null, but just let this
+ // Note at this point dependencyList cannot be null, but just let this
// as a sanity check.
- if (dependencyList != null)
- {
- _classToResourceDependencyMap.put(inspectedClass, dependencyList);
- }
+ _classToResourceDependencyMap.put(inspectedClass, dependencyList);
}
if (!classAlreadyProcessed)
@@ -2013,7 +2010,7 @@ public class ApplicationImpl extends App
checkEmpty(validatorId, "validatorId");
Class<? extends Validator> validatorClass =
- getObjectFromClassMap(validatorId, _validatorClassMap, Validator.class);
+ getObjectFromClassMap(validatorId, _validatorClassMap);
if (validatorClass == null)
{
String message = "Unknown validator id '" + validatorId + "'.";
@@ -2282,14 +2279,12 @@ public class ApplicationImpl extends App
}
}
- if(isProduction && !isCachedList) //if we're in production and the list is not yet cached, store it
+ //if we're in production and the list is not yet cached, store it
+ if(isProduction && !isCachedList && listenerForList != null)
{
- // Note at this point listenerForList cannot be null, but just let this
+ // Note at this point listenerForList cannot be null, but just let listenerForList != null
// as a sanity check.
- if (listenerForList != null)
- {
- _classToListenerForMap.put(inspectedClass, listenerForList);
- }
+ _classToListenerForMap.put(inspectedClass, listenerForList);
}
}
@@ -2431,14 +2426,12 @@ public class ApplicationImpl extends App
}
}
- if(isProduction && !isCachedList) //if we're in production and the list is not yet cached, store it
+ //if we're in production and the list is not yet cached, store it
+ if(isProduction && !isCachedList && dependencyList != null)
{
- // Note at this point listenerForList cannot be null, but just let this
+ // Note at this point listenerForList cannot be null, but just let dependencyList != null
// as a sanity check.
- if (dependencyList != null)
- {
- _classToResourceDependencyMap.put(inspectedClass, dependencyList);
- }
+ _classToResourceDependencyMap.put(inspectedClass, dependencyList);
}
if (!classAlreadyProcessed)
@@ -2663,12 +2656,10 @@ public class ApplicationImpl extends App
// The normal case is a listener was added,
// so as heuristic, check first
// if we can find it at the same location
- if (!listener.equals(listenersCopy.get(i)))
+ if (!listener.equals(listenersCopy.get(i)) &&
+ !listenersCopy.contains(listener))
{
- if (!listenersCopy.contains(listener))
- {
- listenersCopy.add(listener);
- }
+ listenersCopy.add(listener);
}
}
else
@@ -2830,7 +2821,7 @@ public class ApplicationImpl extends App
* @param classMap
* @return
*/
- private <T> Class<? extends T> getObjectFromClassMap(String id, Map<String, Object> classMap, Class<T> targetType)
+ private <T> Class<? extends T> getObjectFromClassMap(String id, Map<String, Object> classMap)
{
Object obj = classMap.get(id);
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java Sat Nov 16 01:41:08 2013
@@ -245,15 +245,13 @@ public class NavigationHandlerImpl
partialViewContext.setRenderAll(true);
}
- if (facesContext.getViewRoot() != null)
+ if (facesContext.getViewRoot() != null &&
+ facesContext.getViewRoot().getAttributes().containsKey("oam.CALL_PRE_DISPOSE_VIEW"))
{
- if (facesContext.getViewRoot().getAttributes().containsKey("oam.CALL_PRE_DISPOSE_VIEW"))
- {
- facesContext.getAttributes().put(SKIP_ITERATION_HINT, Boolean.TRUE);
- facesContext.getViewRoot().visitTree(VisitContext.createVisitContext(facesContext),
- new PreDisposeViewCallback());
- facesContext.getAttributes().remove(SKIP_ITERATION_HINT);
- }
+ facesContext.getAttributes().put(SKIP_ITERATION_HINT, Boolean.TRUE);
+ facesContext.getViewRoot().visitTree(VisitContext.createVisitContext(facesContext),
+ new PreDisposeViewCallback());
+ facesContext.getAttributes().remove(SKIP_ITERATION_HINT);
}
applyFlowTransition(facesContext, navigationContext);
@@ -305,24 +303,22 @@ public class NavigationHandlerImpl
private void applyFlowTransition(FacesContext facesContext, NavigationContext navigationContext)
{
//Apply Flow transition if any
- if (navigationContext != null)
+ // Is any flow transition on the way?
+ if (navigationContext != null &&
+ navigationContext.getSourceFlows() != null ||
+ (navigationContext.getTargetFlows() != null &&
+ !navigationContext.getTargetFlows().isEmpty()))
{
- // Is any flow transition on the way?
- if (navigationContext.getSourceFlows() != null ||
- (navigationContext.getTargetFlows() != null &&
- !navigationContext.getTargetFlows().isEmpty()))
+ FlowHandler flowHandler = facesContext.getApplication().getFlowHandler();
+ for (int i = 0; i < navigationContext.getTargetFlows().size(); i++)
{
- FlowHandler flowHandler = facesContext.getApplication().getFlowHandler();
- for (int i = 0; i < navigationContext.getTargetFlows().size(); i++)
- {
- Flow sourceFlow = navigationContext.getSourceFlows().get(i);
- Flow targetFlow = navigationContext.getTargetFlows().get(i);
+ Flow sourceFlow = navigationContext.getSourceFlows().get(i);
+ Flow targetFlow = navigationContext.getTargetFlows().get(i);
- flowHandler.transition(facesContext, sourceFlow, targetFlow,
- navigationContext.getFlowCallNodes().get(i),
- navigationContext.getNavigationCase().getToViewId(facesContext));
- sourceFlow = targetFlow;
- }
+ flowHandler.transition(facesContext, sourceFlow, targetFlow,
+ navigationContext.getFlowCallNodes().get(i),
+ navigationContext.getNavigationCase().getToViewId(facesContext));
+ sourceFlow = targetFlow;
}
}
}
@@ -524,7 +520,6 @@ public class NavigationHandlerImpl
{
// Add the transition to exit from the flow
Flow baseReturnFlow = navigationContext.getCurrentFlow(facesContext);
- Flow sourceFlow = baseReturnFlow;
// This is the part when the pseudo "recursive call" is done.
while (baseReturnFlow != null && !(baseReturnFlow.getDefiningDocumentId().equals(
targetFlow.getDefiningDocumentId()) &&
@@ -888,12 +883,6 @@ public class NavigationHandlerImpl
return navigationCase;
}
- private NavigationContext getFlowNavigationCommand (FacesContext facesContext, Flow targetFlow, String node)
- {
- return null;
-
- }
-
/**
* Derive a NavigationCase from a flow node.
*
@@ -1214,47 +1203,41 @@ public class NavigationHandlerImpl
}
else
{
- if (cazeOutcome != null)
+ if (cazeOutcome != null && (outcome != null) && cazeOutcome.equals (outcome))
{
- if ((outcome != null) && cazeOutcome.equals (outcome))
- {
- // Second case: if only <from-outcome> specified, match against outcome.
- // Caveat: if <if> is available, evaluate.
+ // Second case: if only <from-outcome> specified, match against outcome.
+ // Caveat: if <if> is available, evaluate.
- if (cazeIf != null)
- {
- if (ifMatches)
- {
- secondCaseIf = caze;
- //return caze;
- }
-
- continue;
- }
- else
+ if (cazeIf != null)
+ {
+ if (ifMatches)
{
- secondCase = caze;
+ secondCaseIf = caze;
//return caze;
}
+
+ continue;
+ }
+ else
+ {
+ secondCase = caze;
+ //return caze;
}
}
}
// Fourth case: anything else matches if outcome is not null or <if> is specified.
- if (outcome != null)
+ if (outcome != null && cazeIf != null)
{
// Again, if <if> present, evaluate.
- if (cazeIf != null)
+ if (ifMatches)
{
- if (ifMatches)
- {
- fourthCaseIf = caze;
- //return caze;
- }
-
- continue;
+ fourthCaseIf = caze;
+ //return caze;
}
+
+ continue;
}
if ((cazeIf != null) && ifMatches)
@@ -1320,7 +1303,7 @@ public class NavigationHandlerImpl
ExternalContext externalContext = facesContext.getExternalContext();
RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext);
- calculateNavigationCases(facesContext, runtimeConfig);
+ calculateNavigationCases(runtimeConfig);
}
return _navigationCases;
}
@@ -1332,7 +1315,7 @@ public class NavigationHandlerImpl
if (_navigationCases == null || runtimeConfig.isNavigationRulesChanged())
{
- calculateNavigationCases(facesContext, runtimeConfig);
+ calculateNavigationCases(runtimeConfig);
}
return _navigationCases;
}
@@ -1386,7 +1369,7 @@ public class NavigationHandlerImpl
new _FlowNavigationStructure(flow.getDefiningDocumentId(), flow.getId(), cases, wildcardPatterns) );
}
- private synchronized void calculateNavigationCases(FacesContext facesContext, RuntimeConfig runtimeConfig)
+ private synchronized void calculateNavigationCases(RuntimeConfig runtimeConfig)
{
if (_navigationCases == null || runtimeConfig.isNavigationRulesChanged())
{
@@ -1465,7 +1448,7 @@ public class NavigationHandlerImpl
boolean includeViewParams = false; // default value is false
if (includeViewParamsAttribute != null)
{
- includeViewParams = new Boolean(includeViewParamsAttribute);
+ includeViewParams = Boolean.valueOf(includeViewParamsAttribute);
}
apiCases.add(new NavigationCase(rule.getFromViewId(),configCase.getFromAction(),
configCase.getFromOutcome(),configCase.getIf(),configCase.getToViewId(),
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java Sat Nov 16 01:41:08 2013
@@ -308,12 +308,9 @@ public class ResourceHandlerImpl extends
}
}
- if (resourceId != null)
+ if (resourceId != null && !resourceLoader.resourceExists(resourceId))
{
- if (!resourceLoader.resourceExists(resourceId))
- {
- resourceId = null;
- }
+ resourceId = null;
}
}
@@ -357,12 +354,9 @@ public class ResourceHandlerImpl extends
}
}
- if (resourceId != null)
+ if (resourceId != null && !resourceLoader.resourceExists(resourceId))
{
- if (!resourceLoader.resourceExists(resourceId))
- {
- resourceId = null;
- }
+ resourceId = null;
}
}
@@ -423,12 +417,9 @@ public class ResourceHandlerImpl extends
}
}
- if (resourceId != null)
+ if (resourceId != null && !resourceLoader.resourceExists(resourceId))
{
- if (!resourceLoader.resourceExists(resourceId))
- {
- resourceId = null;
- }
+ resourceId = null;
}
}
@@ -472,12 +463,9 @@ public class ResourceHandlerImpl extends
}
}
- if (resourceId != null)
+ if (resourceId != null && !resourceLoader.resourceExists(resourceId))
{
- if (!resourceLoader.resourceExists(resourceId))
- {
- resourceId = null;
- }
+ resourceId = null;
}
}
@@ -1148,11 +1136,8 @@ public class ResourceHandlerImpl extends
String rnToken = resourceId.substring(secondLastSlash+1, lastSlash);
int lastPoint = rnToken.lastIndexOf('.');
- if (lastPoint < 0)
- {
- //does not match, the token is not a resource version
- }
- else
+ // lastPoint < 0 means it does not match, the token is not a resource version
+ if (lastPoint >= 0)
{
String ext = rnToken.substring(lastPoint);
if (token.endsWith(ext))
@@ -1326,11 +1311,8 @@ public class ResourceHandlerImpl extends
String rnToken = resourceId.substring(secondLastSlash+1, lastSlash);
int lastPoint = rnToken.lastIndexOf('.');
- if (lastPoint < 0)
- {
- //does not match, the token is not a resource version
- }
- else
+ // lastPoint < 0 means it does not match, the token is not a resource version
+ if (lastPoint >= 0)
{
String ext = rnToken.substring(lastPoint);
if (token.endsWith(ext))
@@ -1484,12 +1466,9 @@ public class ResourceHandlerImpl extends
resourceName, resourceVersion);
}
- if (resourceMeta != null)
+ if (resourceMeta != null && !resourceLoader.resourceExists(resourceMeta))
{
- if (!resourceLoader.resourceExists(resourceMeta))
- {
- resourceMeta = null;
- }
+ resourceMeta = null;
}
}
@@ -1504,12 +1483,9 @@ public class ResourceHandlerImpl extends
resourceName, resourceVersion);
}
- if (resourceMeta != null)
+ if (resourceMeta != null && !resourceLoader.resourceExists(resourceMeta))
{
- if (!resourceLoader.resourceExists(resourceMeta))
- {
- resourceMeta = null;
- }
+ resourceMeta = null;
}
}
@@ -1533,12 +1509,9 @@ public class ResourceHandlerImpl extends
resourceName, resourceVersion, contractName);
}
- if (resourceMeta != null)
+ if (resourceMeta != null && !resourceLoader.resourceExists(resourceMeta))
{
- if (!resourceLoader.resourceExists(resourceMeta))
- {
- resourceMeta = null;
- }
+ resourceMeta = null;
}
}
@@ -1553,12 +1526,9 @@ public class ResourceHandlerImpl extends
resourceName, resourceVersion, contractName);
}
- if (resourceMeta != null)
+ if (resourceMeta != null && !resourceLoader.resourceExists(resourceMeta))
{
- if (!resourceLoader.resourceExists(resourceMeta))
- {
- resourceMeta = null;
- }
+ resourceMeta = null;
}
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java Sat Nov 16 01:41:08 2013
@@ -430,10 +430,10 @@ public class ViewHandlerImpl extends Vie
}
- else
- {
+ //else
+ //{
//we're in a JSP, let the JSPStatemanager know that we need to actually write the state
- }
+ //}
}
private Map<String, List<String>> getViewParameterList(FacesContext context,
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/cdi/util/BeanProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/cdi/util/BeanProvider.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/cdi/util/BeanProvider.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/cdi/util/BeanProvider.java Sat Nov 16 01:41:08 2013
@@ -18,7 +18,6 @@
*/
package org.apache.myfaces.cdi.util;
-import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.Typed;
import javax.enterprise.inject.spi.Bean;
@@ -26,11 +25,8 @@ import javax.enterprise.inject.spi.BeanM
import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
-import java.util.logging.Logger;
/**
* <p>This class contains utility methods to resolve contextual references
@@ -49,7 +45,7 @@ import java.util.logging.Logger;
@Typed()
public final class BeanProvider
{
- private static final Logger LOG = Logger.getLogger(BeanProvider.class.getName());
+ //private static final Logger LOG = Logger.getLogger(BeanProvider.class.getName());
/*
private static final boolean LOG_DEPENDENT_WARNINGS;
@@ -321,7 +317,7 @@ public final class BeanProvider
return getBeanDefinitions(type, optional, includeDefaultScopedBeans, beanManager);
}*/
-
+ /*
private static <T> Set<Bean<T>> getBeanDefinitions(Class<T> type,
boolean optional,
boolean includeDefaultScopedBeans,
@@ -353,7 +349,7 @@ public final class BeanProvider
}
return result;
- }
+ }*/
/**
* Allows to perform dependency injection for instances which aren't managed by CDI.
@@ -364,9 +360,8 @@ public final class BeanProvider
* @param instance current instance
* @param <T> current type
* @return instance with injected fields (if possible - or null if the given instance is null)
- */
+ *//*
@SuppressWarnings("unchecked")
- /*
public static <T> T injectFields(T instance)
{
if (instance == null)
@@ -384,6 +379,7 @@ public final class BeanProvider
return instance;
}*/
+ /*
private static Set<Bean<?>> filterDefaultScopedBeans(Set<Bean<?>> beans)
{
Set<Bean<?>> result = new HashSet<Bean<?>>(beans.size());
@@ -401,7 +397,7 @@ public final class BeanProvider
}
}
return result;
- }
+ }*/
/**
* Internal helper method to resolve the right bean and resolve the contextual reference.
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/component/visit/PartialVisitContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/component/visit/PartialVisitContext.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/component/visit/PartialVisitContext.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/component/visit/PartialVisitContext.java Sat Nov 16 01:41:08 2013
@@ -305,10 +305,10 @@ public class PartialVisitContext extends
{
id = clientId.substring(lastIndex + 1);
}
- else
- {
+ //else
+ //{
// TODO log warning for trailing colon case
- }
+ //}
return id;
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java Sat Nov 16 01:41:08 2013
@@ -369,13 +369,10 @@ public class DefaultFacesConfigurationMe
{
FacesConfig f = (FacesConfig) v.getNode();
boolean added = false;
- if (f.getOrdering() != null)
+ if (f.getOrdering() != null && !f.getOrdering().getBeforeList().isEmpty())
{
- if (!f.getOrdering().getBeforeList().isEmpty())
- {
- added = true;
- sortedList.add(0,f);
- }
+ added = true;
+ sortedList.add(0,f);
}
if (!added)
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java Sat Nov 16 01:41:08 2013
@@ -1293,8 +1293,6 @@ public class FacesConfigurator
RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext);
LifecycleProvider lifecycleProvider = LifecycleProviderFactory
.getLifecycleProviderFactory(externalContext).getLifecycleProvider(externalContext);
- InjectionProvider injectionProvider = InjectionProviderFactory
- .getInjectionProviderFactory(externalContext).getInjectionProvider(externalContext);
// create ManagedBeanDestroyer
ManagedBeanDestroyer mbDestroyer
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultAnnotationProvider.java Sat Nov 16 01:41:08 2013
@@ -92,8 +92,6 @@ public class DefaultAnnotationProvider e
private static final String META_INF_PREFIX = "META-INF/";
private static final String FACES_CONFIG_SUFFIX = ".faces-config.xml";
-
- private static final String STANDARD_FACES_CONFIG_RESOURCE = "META-INF/standard-faces-config.xml";
/**
* <p>Resource path used to acquire implicit resources buried
@@ -289,7 +287,7 @@ public class DefaultAnnotationProvider e
JarFile jarFile = getJarFile(url);
if (jarFile != null)
{
- archiveClasses(ctx, jarFile, list);
+ archiveClasses(jarFile, list);
}
}
catch(IOException e)
@@ -325,7 +323,7 @@ public class DefaultAnnotationProvider e
JarFile jarFile = JarUtils.getJarFile(jarUrl);
if (jarFile != null)
{
- archiveClasses(context, jarFile, list);
+ archiveClasses(jarFile, list);
}
}
catch(IOException e)
@@ -415,7 +413,7 @@ public class DefaultAnnotationProvider e
JarFile jarFile = ((JarURLConnection) url.openConnection())
.getJarFile();
- archiveClasses(externalContext, jarFile, list);
+ archiveClasses(jarFile, list);
}
else
{
@@ -440,9 +438,8 @@ public class DefaultAnnotationProvider e
*
* @exception ClassNotFoundException if a located class cannot be loaded
*/
- private List<Class<?>> archiveClasses(ExternalContext context, JarFile jar, List<Class<?>> list)
+ private List<Class<?>> archiveClasses(JarFile jar, List<Class<?>> list)
{
-
// Accumulate and return a list of classes in this JAR file
ClassLoader loader = ClassUtils.getContextClassLoader();
if (loader == null)
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java Sat Nov 16 01:41:08 2013
@@ -191,7 +191,7 @@ public class PartialResponseWriterImpl e
private void popAndEncodeCurrentStackEntry() throws IOException
{
- StackEntry elem = _nestingStack.remove(0);
+ _nestingStack.remove(0);
StackEntry parent = (_nestingStack.isEmpty()) ? null : _nestingStack.get(0);
if (parent != null)
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java Sat Nov 16 01:41:08 2013
@@ -348,32 +348,6 @@ public final class ServletExternalContex
checkHttpServletRequest();
String encodedUrl = ((HttpServletResponse) _servletResponse).encodeURL(url);
encodedUrl = encodeURL(encodedUrl, null);
- //encodedUrl = encodeWindowId(encodedUrl);
- return encodedUrl;
- }
-
- private String encodeWindowId(String encodedUrl)
- {
- FacesContext facesContext = getCurrentFacesContext();
- ClientWindow window = facesContext.getExternalContext().getClientWindow();
- if (window != null)
- {
- if (window.isClientWindowRenderModeEnabled(facesContext))
- {
- //TODO: Use StringBuilder or some optimization.
- Map<String, String> map = window.getQueryURLParameters(facesContext);
- if (map != null)
- {
- for (Map.Entry<String , String> entry : map.entrySet())
- {
- encodedUrl = encodedUrl + ( (encodedUrl.indexOf(URL_QUERY_SEPERATOR) != -1) ?
- URL_PARAM_SEPERATOR : URL_QUERY_SEPERATOR ) +
- entry.getKey() +
- URL_NAME_VALUE_PAIR_SEPERATOR+ entry.getValue();
- }
- }
- }
- }
return encodedUrl;
}
@@ -402,14 +376,12 @@ public final class ServletExternalContex
{
checkNull(url, "url");
checkHttpServletRequest();
- //return encodeWindowId(((HttpServletResponse) _servletResponse).encodeURL(url));
return encodeURL(((HttpServletResponse) _servletResponse).encodeURL(url), null);
}
@Override
public String encodeRedirectURL(String baseUrl, Map<String,List<String>> parameters)
{
- //return encodeWindowId(_httpServletResponse.encodeRedirectURL(encodeURL(baseUrl, parameters)));
return _httpServletResponse.encodeRedirectURL(encodeURL(baseUrl, parameters));
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java Sat Nov 16 01:41:08 2013
@@ -327,13 +327,11 @@ public class FlowHandlerImpl extends Flo
for (int i = index; i < currentFlowStack.size(); i++)
{
_FlowContextualInfo info = currentFlowStack.get(i);
- if (sourceFlowReference.equals(info.getSourceFlowReference()))
+ if (sourceFlowReference.equals(info.getSourceFlowReference()) &&
+ !flowsToRemove.contains(info))
{
- if (!flowsToRemove.contains(info))
- {
- flowsToRemove.add(info);
- traverseDependantFlows(info.getFlowReference(), i+1, currentFlowStack, flowsToRemove);
- }
+ flowsToRemove.add(info);
+ traverseDependantFlows(info.getFlowReference(), i+1, currentFlowStack, flowsToRemove);
}
}
}
@@ -602,11 +600,7 @@ public class FlowHandlerImpl extends Flo
{
flowHandler.popReturnMode(context);
}
- if (failed)
- {
- // Do nothing.
- }
- else
+ if (!failed)
{
//Call transitions.
for (int j = 0; j < targetFlows.size(); j++)
@@ -825,18 +819,6 @@ public class FlowHandlerImpl extends Flo
currentFlowStack.add(new _FlowContextualInfo(flowReference, toViewId, sourceFlowReference));
}
- private void popFlowReference(FacesContext context, ClientWindow clientWindow,
- List<_FlowContextualInfo> currentFlowStack, int i)
- {
- currentFlowStack.remove(i);
- if (currentFlowStack.isEmpty())
- {
- // Remove it from session but keep it in request scope.
- context.getAttributes().put(ROOT_LAST_VIEW_ID,
- context.getExternalContext().getSessionMap().remove(ROOT_LAST_VIEW_ID + clientWindow.getId()));
- }
- }
-
private List<_FlowContextualInfo> getCurrentFlowStack(FacesContext context, ClientWindow clientWindow)
{
Map<String, Object> sessionMap = context.getExternalContext().getSessionMap();
@@ -894,12 +876,7 @@ public class FlowHandlerImpl extends Flo
return;
}
- if ( Boolean.TRUE.equals(context.getAttributes().get(RETURN_MODE)) )
- {
- // Return mode active
-
- }
- else
+ if ( !Boolean.TRUE.equals(context.getAttributes().get(RETURN_MODE)) )
{
// Return mode not active, activate it, copy the current flow stack.
List<_FlowContextualInfo> currentFlowStack = getCurrentFlowStack(context, clientWindow);
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopedContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopedContextImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopedContextImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopedContextImpl.java Sat Nov 16 01:41:08 2013
@@ -234,13 +234,10 @@ public class FlowScopedContextImpl imple
checkActive(facesContext);
- if (passivatingScope)
+ if (passivatingScope && !(bean instanceof PassivationCapable))
{
- if (!(bean instanceof PassivationCapable))
- {
- throw new IllegalStateException(bean.toString() +
- " doesn't implement " + PassivationCapable.class.getName());
- }
+ throw new IllegalStateException(bean.toString() +
+ " doesn't implement " + PassivationCapable.class.getName());
}
FlowReference reference = flowBeanReferences.get(((Bean)bean).getBeanClass());
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java Sat Nov 16 01:41:08 2013
@@ -238,17 +238,11 @@ class RestoreViewExecutor extends PhaseE
{
ViewMetadata metadata = vdl.getViewMetadata(facesContext, viewId);
- //Collection<UIViewParameter> viewParameters = null;
-
if (metadata != null)
{
viewRoot = metadata.createMetadataView(facesContext);
- if (viewRoot != null)
- {
- //viewParameters = ViewMetadata.getViewParameters(viewRoot);
- }
- else if(facesContext.getResponseComplete())
+ if(facesContext.getResponseComplete())
{
// this can happen if the current request is a debug request,
// in this case no further processing is necessary
@@ -256,12 +250,6 @@ class RestoreViewExecutor extends PhaseE
}
}
- // If viewParameters is not an empty collection DO NOT call renderResponse
- //if ( !(viewParameters != null && !viewParameters.isEmpty()) )
- //{
- // Call renderResponse() on the FacesContext.
- //facesContext.renderResponse();
- //}
if (viewRoot == null)
{
facesContext.renderResponse();
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java Sat Nov 16 01:41:08 2013
@@ -61,7 +61,6 @@ public class HtmlAjaxBehaviorRenderer ex
private static final String COLON = ":";
private static final String EMPTY = "";
private static final String COMMA = ",";
- private static final String TRUE = "true";
private static final String ERR_NO_AJAX_BEHAVIOR = "The behavior must be an instance of AjaxBehavior";
private static final String L_PAREN = "(";
@@ -318,7 +317,7 @@ public class HtmlAjaxBehaviorRenderer ex
* can be sent via the options attribute to javax.faces.ajax
* this still needs further clarifications but I assume so for now
*/
- retVal.append(buildOptions(context.getFacesContext(), paramBuffer, parameterList));
+ retVal.append(buildOptions(paramBuffer, parameterList));
retVal.append(R_PAREN);
@@ -344,7 +343,7 @@ public class HtmlAjaxBehaviorRenderer ex
}
- private StringBuilder buildOptions(FacesContext facesContext, StringBuilder retVal, List<String> options)
+ private StringBuilder buildOptions(StringBuilder retVal, List<String> options)
{
retVal.setLength(0);
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java Sat Nov 16 01:41:08 2013
@@ -19,7 +19,6 @@
package org.apache.myfaces.renderkit.html;
import java.io.IOException;
-import java.util.logging.Logger;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -35,8 +34,6 @@ import org.apache.myfaces.shared.renderk
@JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.Output", type = "javax.faces.CompositeFacet")
public class HtmlCompositeFacetRenderer extends HtmlRenderer
{
- //private static final Log log = LogFactory.getLog(HtmlCompositeFacetRenderer.class);
- private static final Logger log = Logger.getLogger(HtmlCompositeFacetRenderer.class.getName());
public boolean getRendersChildren()
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java Sat Nov 16 01:41:08 2013
@@ -44,7 +44,7 @@ public final class NavigationUtils
boolean includeViewParams = false; // default value is false
if (includeViewParamsAttribute != null)
{
- includeViewParams = new Boolean(includeViewParamsAttribute);
+ includeViewParams = Boolean.valueOf(includeViewParamsAttribute);
}
apiCases.add(new javax.faces.application.NavigationCase(rule.getFromViewId(),
configCase.getFromAction(),
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java Sat Nov 16 01:41:08 2013
@@ -20,7 +20,6 @@ package org.apache.myfaces.view.facelets
import java.io.Serializable;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
@@ -36,14 +35,12 @@ import javax.faces.application.StateMana
import javax.faces.component.ContextCallback;
import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
-import javax.faces.component.UIViewParameter;
import javax.faces.component.UIViewRoot;
import javax.faces.component.visit.VisitCallback;
import javax.faces.component.visit.VisitContext;
import javax.faces.component.visit.VisitContextFactory;
import javax.faces.component.visit.VisitHint;
import javax.faces.component.visit.VisitResult;
-import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.event.PostAddToViewEvent;
import javax.faces.event.PreRemoveFromViewEvent;
@@ -161,7 +158,6 @@ public class DefaultFaceletsStateManagem
private static final String CHECK_ID_PRODUCTION_MODE_DEFAULT = "auto";
private static final String CHECK_ID_PRODUCTION_MODE_TRUE = "true";
- private static final String CHECK_ID_PRODUCTION_MODE_FALSE = "false";
private static final String CHECK_ID_PRODUCTION_MODE_AUTO = "auto";
private static final String SKIP_ITERATION_HINT = "javax.faces.visit.SKIP_ITERATION";
@@ -248,16 +244,10 @@ public class DefaultFaceletsStateManagem
{
ViewMetadata metadata = vdl.getViewMetadata (context, viewId);
- Collection<UIViewParameter> viewParameters = null;
-
if (metadata != null)
{
view = metadata.createMetadataView(context);
- if (view != null)
- {
- viewParameters = metadata.getViewParameters(view);
- }
// If no view and response complete there is no need to continue
if (view == null && context.getResponseComplete())
{
@@ -515,27 +505,25 @@ public class DefaultFaceletsStateManagem
public void invokeContextCallback(FacesContext context,
UIComponent target)
{
- if (target.getParent() != null)
+ if (target.getParent() != null &&
+ !target.getParent().getChildren().remove(target))
{
- if (!target.getParent().getChildren().remove(target))
+ String key = null;
+ if (target.getParent().getFacetCount() > 0)
{
- String key = null;
- if (target.getParent().getFacetCount() > 0)
+ for (Map.Entry<String, UIComponent> entry :
+ target.getParent().getFacets().entrySet())
{
- for (Map.Entry<String, UIComponent> entry :
- target.getParent().getFacets().entrySet())
+ if (entry.getValue()==target)
{
- if (entry.getValue()==target)
- {
- key = entry.getKey();
- break;
- }
+ key = entry.getKey();
+ break;
}
}
- if (key != null)
- {
- target.getParent().getFacets().remove(key);
- }
+ }
+ if (key != null)
+ {
+ target.getParent().getFacets().remove(key);
}
}
}
@@ -603,8 +591,6 @@ public class DefaultFaceletsStateManagem
//return null;
//}
- ExternalContext externalContext = context.getExternalContext();
-
Object serializedView = context.getAttributes()
.get(SERIALIZED_VIEW_REQUEST_ATTR);
@@ -708,20 +694,17 @@ public class DefaultFaceletsStateManagem
{
//Restore view
view.pushComponentToEL(context, view);
- if (viewState != null)
+ if (viewState != null && !(viewState instanceof AttachedFullStateWrapper))
{
- if (!(viewState instanceof AttachedFullStateWrapper))
+ try
{
- try
- {
- view.restoreState(context, viewState);
- }
- catch(Exception e)
- {
- throw new IllegalStateException(
- "Error restoring component: "+
- view.getClientId(context), e);
- }
+ view.restoreState(context, viewState);
+ }
+ catch(Exception e)
+ {
+ throw new IllegalStateException(
+ "Error restoring component: "+
+ view.getClientId(context), e);
}
}
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java Sat Nov 16 01:41:08 2013
@@ -25,7 +25,6 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
@@ -54,7 +53,6 @@ import javax.faces.component.EditableVal
import javax.faces.component.UIComponent;
import javax.faces.component.UINamingContainer;
import javax.faces.component.UIPanel;
-import javax.faces.component.UIViewParameter;
import javax.faces.component.UIViewRoot;
import javax.faces.component.visit.VisitContext;
import javax.faces.component.visit.VisitHint;
@@ -68,7 +66,6 @@ import javax.faces.event.MethodExpressio
import javax.faces.event.PhaseId;
import javax.faces.event.PostAddToViewEvent;
import javax.faces.event.PostRestoreStateEvent;
-import javax.faces.event.PreRemoveFromViewEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.event.ValueChangeListener;
import javax.faces.render.RenderKit;
@@ -583,27 +580,6 @@ public class FaceletViewDeclarationLangu
}
}
- private static void _publishPreRemoveFromViewEvent(FacesContext context, UIComponent component)
- {
- context.getApplication().publishEvent(context, PreRemoveFromViewEvent.class, component.getClass(), component);
-
- if (component.getChildCount() > 0)
- {
- for (int j = 0, childCount = component.getChildCount(); j < childCount; j++)
- {
- UIComponent child = component.getChildren().get(j);
- _publishPreRemoveFromViewEvent(context, child);
- }
- }
- if (component.getFacetCount() > 0)
- {
- for (UIComponent child : component.getFacets().values())
- {
- _publishPreRemoveFromViewEvent(context, child);
- }
- }
- }
-
public static void _publishPostBuildComponentTreeOnRestoreViewEvent(FacesContext context, UIComponent component)
{
context.getApplication().publishEvent(context, PostBuildComponentTreeOnRestoreViewEvent.class,
@@ -1249,7 +1225,7 @@ public class FaceletViewDeclarationLangu
methodExpression = reWrapMethodExpression(methodExpression, attributeNameValueExpression);
- applyMethodExpression(context, mctx, elContext, topLevelComponent, attributeName,
+ applyMethodExpression(context, mctx, topLevelComponent, attributeName,
targetAttributeName, attributeNameValueExpression, methodExpression,
ccAttrMeRedirection, targetsArray);
}
@@ -1545,8 +1521,7 @@ public class FaceletViewDeclarationLangu
mctx.addMethodExpressionTargeted(innerComponent, targetAttributeName, valueChangeListener);
}
- private void applyMethodExpression(FacesContext context, FaceletCompositionContext mctx,
- ELContext elContext,
+ private void applyMethodExpression(FacesContext context, FaceletCompositionContext mctx,
UIComponent topLevelComponent,
String attributeName,
String targetAttributeName,
@@ -2009,14 +1984,9 @@ public class FaceletViewDeclarationLangu
try
{
ViewMetadata metadata = vdl.getViewMetadata (context, viewId);
- Collection<UIViewParameter> viewParameters = null;
if (metadata != null)
{
view = metadata.createMetadataView(context);
- if (view != null)
- {
- viewParameters = metadata.getViewParameters(view);
- }
}
if (view == null)
{
@@ -2291,7 +2261,6 @@ public class FaceletViewDeclarationLangu
}
// 2. get it from request
- Object request = context.getExternalContext().getRequest();
if (encoding == null)
{
encoding = context.getExternalContext().getRequestCharacterEncoding();
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java Sat Nov 16 01:41:08 2013
@@ -61,8 +61,6 @@ public abstract class Compiler
private static final TagLibrary EMPTY_LIBRARY = new CompositeTagLibrary(new TagLibrary[0]);
- private static final TagDecorator EMPTY_DECORATOR = new CompositeTagDecorator(new TagDecorator[0]);
-
private boolean validating = false;
private boolean trimmingWhitespace = false;
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java Sat Nov 16 01:41:08 2013
@@ -57,17 +57,6 @@ public class FaceletsCompilerSupport
private static final Logger log = Logger.getLogger(FaceletsCompilerSupport.class.getName());
/**
- * Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.
- */
- @JSFWebConfigParam(since = "2.0",
- desc = "Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.",
- deprecated = true)
- private final static String PARAM_LIBRARIES_DEPRECATED = "facelets.LIBRARIES";
-
- private final static String[] PARAMS_LIBRARIES = {ViewHandler.FACELETS_LIBRARIES_PARAM_NAME,
- PARAM_LIBRARIES_DEPRECATED};
-
- /**
* Set of class names, separated by ';', implementing TagDecorator interface, used to transform
* a view definition in a facelet abstract syntax tree, that is used later to generate a component tree.
*/
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java Sat Nov 16 01:41:08 2013
@@ -80,7 +80,7 @@ public final class FaceletsProcessingIns
private final boolean html5Doctype;
- public final static FaceletsProcessingInstructions getProcessingInstructions(String processAs)
+ public static FaceletsProcessingInstructions getProcessingInstructions(String processAs)
{
if (processAs == null)
{
@@ -108,7 +108,7 @@ public final class FaceletsProcessingIns
}
}
- public final static FaceletsProcessingInstructions getProcessingInstructions(
+ public static FaceletsProcessingInstructions getProcessingInstructions(
String processAs, boolean compressSpaces)
{
if (!compressSpaces)
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceManager.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceManager.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceManager.java Sat Nov 16 01:41:08 2013
@@ -92,7 +92,7 @@ final class NamespaceManager
}
}
- public final NamespaceUnit toNamespaceUnit(TagLibrary library)
+ public NamespaceUnit toNamespaceUnit(TagLibrary library)
{
NamespaceUnit unit = new NamespaceUnit(library);
if (this.namespaces.size() > 0)
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java Sat Nov 16 01:41:08 2013
@@ -143,11 +143,6 @@ public final class SAXCompiler extends C
}
}
- public void endDocument() throws SAXException
- {
- super.endDocument();
- }
-
public void endDTD() throws SAXException
{
this.inDocument = true;
@@ -352,11 +347,6 @@ public final class SAXCompiler extends C
}
}
- public void endDocument() throws SAXException
- {
- super.endDocument();
- }
-
public void endDTD() throws SAXException
{
this.inDocument = true;
@@ -577,11 +567,6 @@ public final class SAXCompiler extends C
}
}
- public void endDocument() throws SAXException
- {
- super.endDocument();
- }
-
public void endDTD() throws SAXException
{
this.inDocument = true;
@@ -945,7 +930,7 @@ public final class SAXCompiler extends C
return FaceletsProcessingInstructions.getProcessingInstructions(processAs, compressSpaces);
}
- protected static final String writeXmlDecl(InputStream is, CompilationManager mngr) throws IOException
+ protected static String writeXmlDecl(InputStream is, CompilationManager mngr) throws IOException
{
is.mark(128);
String encoding = null;
@@ -976,7 +961,7 @@ public final class SAXCompiler extends C
return encoding;
}
- protected static final String getXmlDecl(InputStream is, CompilationManager mngr) throws IOException
+ protected static String getXmlDecl(InputStream is, CompilationManager mngr) throws IOException
{
is.mark(128);
String encoding = null;
@@ -987,13 +972,9 @@ public final class SAXCompiler extends C
{
String r = new String(b);
Matcher m = XML_DECLARATION.matcher(r);
- if (m.find())
+ if (m.find() && m.group(3) != null)
{
- //mngr.writeInstruction(m.group(0) + "\n");
- if (m.group(3) != null)
- {
- encoding = m.group(3);
- }
+ encoding = m.group(3);
}
}
}
@@ -1004,7 +985,7 @@ public final class SAXCompiler extends C
return encoding;
}
- private final SAXParser createSAXParser(DefaultHandler handler) throws SAXException,
+ private SAXParser createSAXParser(DefaultHandler handler) throws SAXException,
ParserConfigurationException
{
SAXParserFactory factory = SAXParserFactory.newInstance();
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/_ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/_ComponentUtils.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/_ComponentUtils.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/_ComponentUtils.java Sat Nov 16 01:41:08 2013
@@ -118,7 +118,7 @@ class _ComponentUtils
*/
static UIComponent findComponent(UIComponent findBase, String id, final char separatorChar)
{
- if (!(findBase instanceof NamingContainer) && idsAreEqual(id, findBase, separatorChar))
+ if (!(findBase instanceof NamingContainer) && idsAreEqual(id, findBase))
{
return findBase;
}
@@ -136,7 +136,7 @@ class _ComponentUtils
return find;
}
}
- else if (idsAreEqual(id, facet, separatorChar))
+ else if (idsAreEqual(id, facet))
{
return facet;
}
@@ -154,13 +154,13 @@ class _ComponentUtils
return find;
}
}
- else if (idsAreEqual(id, child, separatorChar))
+ else if (idsAreEqual(id, child))
{
return child;
}
}
- if (findBase instanceof NamingContainer && idsAreEqual(id, findBase, separatorChar))
+ if (findBase instanceof NamingContainer && idsAreEqual(id, findBase))
{
return findBase;
}
@@ -236,7 +236,7 @@ class _ComponentUtils
* Return true if the specified component matches the provided id. This needs some quirks to handle components whose
* id value gets dynamically "tweaked", eg a UIData component whose id gets the current row index appended to it.
*/
- private static boolean idsAreEqual(String id, UIComponent cmp, final char separatorChar)
+ private static boolean idsAreEqual(String id, UIComponent cmp)
{
if (id.equals(cmp.getId()))
{
@@ -260,11 +260,6 @@ class _ComponentUtils
return false;
}
- private static boolean dynamicIdIsEqual(String dynamicId, String id)
- {
- return dynamicId.matches(id + ":[0-9]*");
- }
-
static void callValidators(FacesContext context, UIInput input, Object convertedValue)
{
// first invoke the list of validator components
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java Sat Nov 16 01:41:08 2013
@@ -564,7 +564,7 @@ public class ELText
int len = ca.length;
int end = len - 1;
boolean esc = false;
- int vlen = 0;
+ //int vlen = 0;
while (i < len)
{
@@ -584,7 +584,7 @@ public class ELText
{
if ('{' == ca[i + 1])
{
- vlen = findVarLength(ca, i);
+ //vlen = findVarLength(ca, i);
//In this point we have at least 1 EL expression, so it is not literal
return false;
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java Sat Nov 16 01:41:08 2013
@@ -311,7 +311,7 @@ final class DefaultFacelet extends Abstr
}
}
- private final void refresh(UIComponent c)
+ private void refresh(UIComponent c)
{
if (_refreshPeriod > 0)
{
@@ -373,7 +373,7 @@ final class DefaultFacelet extends Abstr
}
}
- private final void markApplied(UIComponent parent)
+ private void markApplied(UIComponent parent)
{
if (this._refreshPeriod > 0)
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/MetaRulesetImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/MetaRulesetImpl.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/MetaRulesetImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/MetaRulesetImpl.java Sat Nov 16 01:41:08 2013
@@ -329,7 +329,7 @@ public final class MetaRulesetImpl exten
return this;
}
- private final MetadataTarget _getMetadataTarget()
+ private MetadataTarget _getMetadataTarget()
{
Map<String, MetadataTarget> metadata = getMetaData();
String metaKey = _type.getName();
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java Sat Nov 16 01:41:08 2013
@@ -258,13 +258,13 @@ public class AttributeHandler extends Ta
{
if (_propertyDescriptor == null)
{
- _propertyDescriptor = _createPropertyDescriptor(ctx, compositeBaseParent);
+ _propertyDescriptor = _createPropertyDescriptor(ctx);
}
attributeList.add(_propertyDescriptor);
}
else
{
- PropertyDescriptor attribute = _createPropertyDescriptor(ctx, compositeBaseParent);
+ PropertyDescriptor attribute = _createPropertyDescriptor(ctx);
attributeList.add(attribute);
}
@@ -311,7 +311,7 @@ public class AttributeHandler extends Ta
}
}
- private PropertyDescriptor _createPropertyDescriptor(FaceletContext ctx, UIComponent parent)
+ private PropertyDescriptor _createPropertyDescriptor(FaceletContext ctx)
throws TagException, IOException
{
try
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentDefinitionTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentDefinitionTagHandler.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentDefinitionTagHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentDefinitionTagHandler.java Sat Nov 16 01:41:08 2013
@@ -143,7 +143,7 @@ public final class CompositeComponentDef
{
if (_cachedBeanInfo == null)
{
- tempBeanInfo = _createCompositeComponentMetadata(ctx, compositeBaseParent);
+ tempBeanInfo = _createCompositeComponentMetadata(compositeBaseParent);
compositeBaseParent.getAttributes().put(
UIComponent.BEANINFO_KEY, tempBeanInfo);
@@ -197,7 +197,7 @@ public final class CompositeComponentDef
}
else
{
- tempBeanInfo = _createCompositeComponentMetadata(ctx, compositeBaseParent);
+ tempBeanInfo = _createCompositeComponentMetadata(compositeBaseParent);
compositeBaseParent.getAttributes().put(
UIComponent.BEANINFO_KEY, tempBeanInfo);
@@ -263,8 +263,7 @@ public final class CompositeComponentDef
}
}
- private CompositeComponentBeanInfo _createCompositeComponentMetadata(
- FaceletContext ctx, UIComponent parent)
+ private CompositeComponentBeanInfo _createCompositeComponentMetadata(UIComponent parent)
{
BeanDescriptor descriptor = new BeanDescriptor(parent.getClass());
CompositeComponentBeanInfo beanInfo = new CompositeComponentBeanInfo(descriptor);
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java Sat Nov 16 01:41:08 2013
@@ -540,7 +540,7 @@ public class CompositeComponentResourceT
//1. Initialize map used to retrieve facets
if (innerCompositeComponent.getFacetCount() == 0)
{
- checkFacetRequired(ctx, parent, name);
+ checkFacetRequired(ctx, name);
return true;
}
UIComponent facet = innerCompositeComponent.getFacet(name);
@@ -553,7 +553,7 @@ public class CompositeComponentResourceT
}
else
{
- checkFacetRequired(ctx, parent, name);
+ checkFacetRequired(ctx, name);
return true;
}
}
@@ -668,7 +668,7 @@ public class CompositeComponentResourceT
//1. Initialize map used to retrieve facets
if (_facetHandlers == null || _facetHandlers.isEmpty())
{
- checkFacetRequired(ctx, parent, name);
+ checkFacetRequired(ctx, name);
return true;
}
@@ -702,7 +702,7 @@ public class CompositeComponentResourceT
}
else
{
- checkFacetRequired(ctx, parent, name);
+ checkFacetRequired(ctx, name);
return true;
}
}
@@ -734,7 +734,7 @@ public class CompositeComponentResourceT
}
}
- private void checkFacetRequired(FaceletContext ctx, UIComponent parent, String name)
+ private void checkFacetRequired(FaceletContext ctx, String name)
{
AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/FacetHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/FacetHandler.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/FacetHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/FacetHandler.java Sat Nov 16 01:41:08 2013
@@ -236,13 +236,13 @@ public class FacetHandler extends TagHan
{
if (_propertyDescriptor == null)
{
- _propertyDescriptor = _createFacetPropertyDescriptor(facetName, ctx, parent);
+ _propertyDescriptor = _createFacetPropertyDescriptor(facetName, ctx);
}
facetPropertyDescriptorMap.put(facetName, _propertyDescriptor);
}
else
{
- PropertyDescriptor facetDescriptor = _createFacetPropertyDescriptor(facetName, ctx, parent);
+ PropertyDescriptor facetDescriptor = _createFacetPropertyDescriptor(facetName, ctx);
facetPropertyDescriptorMap.put(facetName, facetDescriptor);
}
@@ -285,7 +285,7 @@ public class FacetHandler extends TagHan
}
}
- private PropertyDescriptor _createFacetPropertyDescriptor(String facetName, FaceletContext ctx, UIComponent parent)
+ private PropertyDescriptor _createFacetPropertyDescriptor(String facetName, FaceletContext ctx)
throws TagException, IOException
{
try
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java?rev=1542444&r1=1542443&r2=1542444&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java Sat Nov 16 01:41:08 2013
@@ -142,7 +142,7 @@ public class InsertFacetHandler extends
beanDescriptor.setValue(INSERT_FACET_KEYS, insertFacetPropertyDescriptorMap);
}
- PropertyDescriptor facetDescriptor = _createFacetPropertyDescriptor(facetName, ctx, parent);
+ PropertyDescriptor facetDescriptor = _createFacetPropertyDescriptor(facetName, ctx);
insertFacetPropertyDescriptorMap.put(facetName, facetDescriptor);
}
else
@@ -151,15 +151,12 @@ public class InsertFacetHandler extends
AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
- UIComponent parentCompositeComponent
- = FaceletCompositionContext.getCurrentInstance(ctx).getCompositeComponentFromStack();
-
actx.includeCompositeComponentDefinition(parent, facetName);
}
}
- private PropertyDescriptor _createFacetPropertyDescriptor(String facetName, FaceletContext ctx, UIComponent parent)
+ private PropertyDescriptor _createFacetPropertyDescriptor(String facetName, FaceletContext ctx)
throws TagException, IOException
{
try