dev@javaserverfaces.java.net

RetroActive [REVIEW] Perform Partial Processing In PartialViewContext]

From: Roger Kitain <Roger.Kitain_at_Sun.COM>
Date: Fri, 12 Dec 2008 13:27:04 -0500

We've decided to dump the extra PartialTraversal API.
Implementations can still implement Partial Traversal strategies by their
implementation of PartialViewContext.processPartial.

r=aschwartz

attached mail follows:



M jsf-api/src/javax/faces/context/PartialViewContext.java
M jsf-api/src/javax/faces/component/UIViewRoot.java
M jsf-api/src/javax/faces/application/Application.java
M jsf-ri/src/com/sun/faces/context/PartialViewContextImpl.java
M jsf-ri/src/com/sun/faces/application/ApplicationImpl.java
M
jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java
M
jsf-ri/systest-per-webapp/replace-statemanager/src/java/com/sun/faces/systest/NewApplication.java
M
jsf-ri/systest-per-webapp/replace-application/src/java/com/sun/faces/systest/NewApplication.java
--------------------------------------
Index: jsf-api/src/javax/faces/context/PartialViewContext.java
===================================================================
--- jsf-api/src/javax/faces/context/PartialViewContext.java (revision
6093)
+++ jsf-api/src/javax/faces/context/PartialViewContext.java (working
copy)
@@ -43,6 +43,8 @@
 import java.util.Collection;
 import java.util.Map;
 
+import javax.faces.event.PhaseId;
+
 /**
  * <p><strong class="changed_added_2_0">PartialViewContext</strong>
  * contains methods and properties that pertain to partial request
@@ -253,4 +255,18 @@
      */
     public abstract void release();
 
+ /**
+ * <p class="changed_added_2_0">Perform lifecycle processing on
+ * components during the indicated <code>phaseId</code>. Only
+ * those components with identifiers existing in the
+ * <code>Collection</code> returned from {_at_link #getExecuteIds}
+ * and {_at_link #getRenderIds} will be processed.</p>
+ *
+ * @param context the current {_at_link FacesContext} instance.
+ * @param phaseId the {_at_link javax.faces.event.PhaseId} that indicates
+ * the lifecycle phase the components will be processed in.
+ */
+ public abstract void processPartial(FacesContext context, PhaseId
phaseId);
+
+
 }

Index: jsf-api/src/javax/faces/component/UIViewRoot.java
===================================================================
--- jsf-api/src/javax/faces/component/UIViewRoot.java (revision 6089)
+++ jsf-api/src/javax/faces/component/UIViewRoot.java (working copy)
@@ -46,7 +46,6 @@
 import javax.el.ValueExpression;
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
-import javax.faces.application.PartialTraversal;
 import javax.faces.application.ProjectStage;
 import javax.faces.component.visit.VisitResult;
 import javax.faces.context.FacesContext;
@@ -876,12 +875,11 @@
 
     /**
      * <p class="changed_added_2_0">If {_at_link
- * javax.faces.context.PartialViewContext#isPartialRequest} returns
<code>true</code>,
- * get the {_at_link javax.faces.application.PartialTraversal} that is
defined for the
- * application. The {_at_link
javax.faces.application.PartialTraversal} and
- * {_at_link javax.faces.context.PartialViewContext} define how
partial view processing
- * will be performed.
- * If {_at_link javax.faces.context.PartialViewContext#isPartialRequest}
+ * javax.faces.context.PartialViewContext#isPartialRequest} returns
+ * <code>true</code>, perform partial processing by calling
+ * {_at_link javax.faces.context.PartialViewContext#processPartial} with
+ * {_at_link PhaseId#APPLY_REQUEST_VALUES}. If
+ * {_at_link javax.faces.context.PartialViewContext#isPartialRequest}
      * returned <code>false</code>, perform <code>processDecodes</code>
on all
      * components in the view.</p>
      * </p>
@@ -905,15 +903,7 @@
         try {
             if (!skipPhase) {
                 if (context.getPartialViewContext().isPartialRequest()) {
- PartialTraversal traversal =
context.getApplication().getPartialTraversal();
- if (traversal != null) {
- traversal.traverse(context,
PhaseId.APPLY_REQUEST_VALUES, this);
- } else {
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE,
-
"severe.processDecodes.traversal_not_defined", "null");
- }
- }
+
context.getPartialViewContext().processPartial(context,
PhaseId.APPLY_REQUEST_VALUES);
                 } else {
                 super.processDecodes(context);
                 }
@@ -950,10 +940,10 @@
 
     /**
      * <p class="changed_added_2_0">If {_at_link
- * javax.faces.context.PartialViewContext#isAjaxRequest} returns
<code>true</code>,
- * perform partial view rendering as defined by the installed
- * {_at_link javax.faces.application.PartialTraversal} strategy.
- * If {_at_link
+ * javax.faces.context.PartialViewContext#isAjaxRequest} returns
+ * <code>true</code>, perform partial rendering by calling
+ * {_at_link javax.faces.context.PartialViewContext#processPartial} with
+ * {_at_link PhaseId#RENDER_RESPONSE}. If {_at_link
      * javax.faces.context.PartialViewContext#isAjaxRequest} returns
      * <code>false</code>, delegate to the parent {_at_link
      * javax.faces.component.UIComponentBase#encodeChildren} method.</p>
@@ -963,15 +953,7 @@
     @Override
     public void encodeChildren(FacesContext context) throws IOException {
         if (context.getPartialViewContext().isAjaxRequest()) {
- PartialTraversal traversal =
context.getApplication().getPartialTraversal();
- if (traversal != null) {
- traversal.traverse(context, PhaseId.RENDER_RESPONSE, this);
- } else {
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE,
-
"severe.encodeChildren.traversal_not_defined", "null");
- }
- }
+ context.getPartialViewContext().processPartial(context,
PhaseId.RENDER_RESPONSE);
         } else {
             super.encodeChildren(context);
         }
@@ -1003,8 +985,7 @@
         boolean value = super.getRendersChildren();
         FacesContext context = FacesContext.getCurrentInstance();
 
- PartialViewContext partialViewContext =
context.getPartialViewContext();
- if (partialViewContext.isAjaxRequest()) {
+ if (context.getPartialViewContext().isAjaxRequest()) {
             value = true;
         }
         return value;
@@ -1107,15 +1088,13 @@
 
     /**
      * <p class="changed_added_2_0">If {_at_link
- * javax.faces.context.PartialViewContext#isPartialRequest} returns
<code>true</code>,
- * get the {_at_link javax.faces.application.PartialTraversal} that is
defined for the
- * application. The {_at_link
javax.faces.application.PartialTraversal} and
- * {_at_link javax.faces.context.PartialViewContext} define how
partial view processing
- * will be performed.
- * If {_at_link javax.faces.context.PartialViewContext#isPartialRequest}
+ * javax.faces.context.PartialViewContext#isPartialRequest} returns
+ * <code>true</code>, perform partial processing by calling
+ * {_at_link javax.faces.context.PartialViewContext#processPartial} with
+ * {_at_link PhaseId#PROCESS_VALIDATIONS}. If
+ * {_at_link javax.faces.context.PartialViewContext#isPartialRequest}
      * returned <code>false</code>, perform
<code>processValidators</code> on all
- * components in the view.</p>
- * </p>
+ * components in the view.</p>
      * <p class="changed_modified_2_0">Override the default
      * {_at_link UIComponentBase#processValidators} behavior to broadcast any
      * queued events after the default processing or partial processing
has been
@@ -1136,17 +1115,10 @@
         try {
             if (!skipPhase) {
                 if (context.getPartialViewContext().isPartialRequest()) {
- PartialTraversal traversal =
context.getApplication().getPartialTraversal();
- if (traversal != null) {
- traversal.traverse(context,
PhaseId.PROCESS_VALIDATIONS, this);
- } else {
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE,
-
"severe.processValidators.traversal_not_defined", "null");
- }
- }
+
context.getPartialViewContext().processPartial(context,
+ PhaseId.PROCESS_VALIDATIONS);
                 } else {
- super.processValidators(context);
+ super.processValidators(context);
                 }
                 broadcastEvents(context, PhaseId.PROCESS_VALIDATIONS);
             }
@@ -1158,12 +1130,11 @@
 
     /**
      * <p class="changed_added_2_0">If {_at_link
- * javax.faces.context.PartialViewContext#isPartialRequest} returns
<code>true</code>,
- * get the {_at_link javax.faces.application.PartialTraversal} that is
defined for the
- * application. The {_at_link
javax.faces.application.PartialTraversal} and
- * {_at_link javax.faces.context.PartialViewContext} define how
partial view processing
- * will be performed.
- * If {_at_link javax.faces.context.PartialViewContext#isPartialRequest}
+ * javax.faces.context.PartialViewContext#isPartialRequest} returns
+ * <code>true</code>, perform partial processing by calling
+ * {_at_link javax.faces.context.PartialViewContext#processPartial} with
+ * {_at_link PhaseId#UPDATE_MODEL_VALUES}. If
+ * {_at_link javax.faces.context.PartialViewContext#isPartialRequest}
      * returned <code>false</code>, perform <code>processUpdates</code>
on all
      * components in the view.</p>
      * </p>
@@ -1187,17 +1158,10 @@
         try {
             if (!skipPhase) {
                 if (context.getPartialViewContext().isPartialRequest()) {
- PartialTraversal traversal =
context.getApplication().getPartialTraversal();
- if (traversal != null) {
- traversal.traverse(context,
PhaseId.UPDATE_MODEL_VALUES, this);
- } else {
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE,
-
"severe.processValidators.traversal_not_defined", "null");
- }
- }
+
context.getPartialViewContext().processPartial(context,
+ PhaseId.UPDATE_MODEL_VALUES);
                 } else {
- super.processUpdates(context);
+ super.processUpdates(context);
                 }
                 broadcastEvents(context, PhaseId.UPDATE_MODEL_VALUES);
             }

Index: jsf-api/src/javax/faces/application/Application.java
===================================================================
--- jsf-api/src/javax/faces/application/Application.java (revision 6089)
+++ jsf-api/src/javax/faces/application/Application.java (working copy)
@@ -249,25 +249,6 @@
     public abstract void setNavigationHandler(NavigationHandler handler);
 
     /**
- * <p class="changed_added_2_0">Return the {_at_link PartialTraversal}
- * instance that will define the traversal scheme for partial view
- * processing and partial view rendering.</p>
- */
- public abstract PartialTraversal getPartialTraversal();
-
- /**
- * <p class="changed_added_2_0">Set the {_at_link PartialTraversal}
- * instance that will define the traversal scheme for partial view
- * processing and partial view rendering.</p>
- *
- * @param traversal The new {_at_link PartialTraversal} instance
- *
- * @throws NullPointerException if <code>traversal</code>
- * is <code>null</code>
- */
- public abstract void setPartialTraversal(PartialTraversal traversal);
-
- /**
      * <p class="changed_added_2_0">Return the singleton, stateless,
thread-safe {_at_link
      * ResourceHandler} for this application. The JSF implementation
      * must support the following techniques for declaring an alternate

Index: jsf-ri/src/com/sun/faces/context/PartialViewContextImpl.java
===================================================================
--- jsf-ri/src/com/sun/faces/context/PartialViewContextImpl.java
(revision 6093)
+++ jsf-ri/src/com/sun/faces/context/PartialViewContextImpl.java
(working copy)
@@ -40,10 +40,17 @@
 
 package com.sun.faces.context;
 
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.visit.VisitCallback;
+import javax.faces.component.visit.VisitContext;
+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.context.PartialViewContext;
 import javax.faces.context.ResponseWriter;
+import javax.faces.event.PhaseId;
 import javax.servlet.http.HttpServletResponse;
 
 import java.io.Writer;
@@ -51,12 +58,15 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Iterator;
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Arrays;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import com.sun.faces.component.visit.PartialVisitContext;
 import com.sun.faces.util.FacesLogger;
 import com.sun.faces.util.OnOffResponseWrapper;
 import com.sun.faces.util.Util;
@@ -78,6 +88,11 @@
     private Boolean partialRequest;
     private Boolean renderAll = null;
 
+ private static final String RENDER_ALL_MARKER = "javax.faces.ViewRoot";
+ private static final String ORIGINAL_WRITER =
"javax.faces.originalWriter";
+ private static final String VIEW_STATE_MARKER =
"javax.faces.ViewState";
+
+
     // -----------------------------------------------------------
Constructors
 
 
@@ -213,6 +228,94 @@
     }
 
     /**
+ * @see javax.faces.context.PartialViewContext#processPartial(
+ * javax.faces.context.FacesContext,javax.faces.event.PhaseId))
+ */
+ @Override
+ public void processPartial(FacesContext context, PhaseId phaseId) {
+ Collection <String> executeIds = getExecuteIds();
+ Collection <String> renderIds = getRenderIds();
+ UIViewRoot viewRoot = context.getViewRoot();
+
+ if (phaseId == PhaseId.APPLY_REQUEST_VALUES ||
+ phaseId == PhaseId.PROCESS_VALIDATIONS ||
+ phaseId == PhaseId.UPDATE_MODEL_VALUES) {
+
+ // Skip this processing if "none" is specified in the
render list,
+ // or there were no execute phase client ids.
+
+ if (executeIds == null || executeIds.isEmpty()) {
+ // PENDING LOG ERROR OR WARNING
+ return;
+ }
+
+ try {
+ processComponents(viewRoot, phaseId, executeIds, context);
+ } catch (Exception e) {
+ // PENDING LOG EXCEPTION
+ }
+
+ // If we have just finished APPLY_REQUEST_VALUES phase,
install the
+ // partial response writer. We want to make sure that any
content
+ // or errors generated in the other phases are written
using the
+ // partial response writer.
+ //
+ if (phaseId == PhaseId.APPLY_REQUEST_VALUES) {
+ ResponseWriter writer = getPartialResponseWriter();
+ context.setResponseWriter(writer);
+ }
+
+ } else if (phaseId == PhaseId.RENDER_RESPONSE) {
+
+ try {
+ //
+ // We re-enable response writing.
+ //
+ OnOffResponseWrapper onOffResponse = new
OnOffResponseWrapper(context);
+ onOffResponse.setEnabled(true);
+ ResponseWriter writer = getPartialResponseWriter();
+ ResponseWriter orig = context.getResponseWriter();
+ context.getAttributes().put(ORIGINAL_WRITER, orig);
+ context.setResponseWriter(writer);
+
+ ExternalContext exContext = context.getExternalContext();
+ if (exContext.getResponse() instanceof
HttpServletResponse) {
+ exContext.setResponseContentType("text/xml");
+ exContext.setResponseHeader("Cache-Control",
"no-cache");
+ writer.startElement("partial-response", viewRoot);
+ writer.startElement("changes", viewRoot);
+ }
+
+ if (isRenderAll()) {
+ renderAll(context, viewRoot);
+ renderState(context, viewRoot);
+ writer.endElement("changes");
+ writer.endElement("partial-response");
+ return;
+ }
+
+ // Skip this processing if "none" is specified in the
render list,
+ // or there were no render phase client ids.
+ if (renderIds == null || renderIds.isEmpty()) {
+ } else {
+ processComponents(viewRoot, phaseId, renderIds,
context);
+ }
+
+ renderState(context, viewRoot);
+
+ writer.endElement("changes");
+ writer.endElement("partial-response");
+ } catch (IOException ex) {
+ this.cleanupAfterView(context);
+ } catch (RuntimeException ex) {
+ this.cleanupAfterView(context);
+ // Throw the exception
+ throw ex;
+ }
+ }
+ }
+
+ /**
      * @see
javax.faces.context.PartialViewContext#getPartialResponseWriter()
      */
     @Override
@@ -260,7 +363,56 @@
        
     }
 
+ // Process the components specified in the phaseClientIds list
+ private void processComponents(UIComponent component, PhaseId phaseId,
+ Collection<String> phaseClientIds, FacesContext context) throws
IOException {
 
+ // We use the tree visitor mechanism to locate the components to
+ // process. Create our (partial) VisitContext and the
+ // VisitCallback that will be invoked for each component that
+ // is visited. Note that we use the VISIT_RENDERED hint as we
+ // only want to visit the rendered subtree.
+ EnumSet hints = EnumSet.of(VisitHint.VISIT_RENDERED,
+ VisitHint.VISIT_TRANSIENT);
+ PartialVisitContext visitContext =
+ new PartialVisitContext(context, phaseClientIds, hints);
+ PhaseAwareVisitCallback visitCallback =
+ new PhaseAwareVisitCallback(phaseId);
+ component.visitTree(visitContext, visitCallback);
+ }
+
+ private void renderAll(FacesContext context, UIViewRoot viewRoot)
throws IOException {
+ // If this is a "render all via ajax" request,
+ // make sure to wrap the entire page in a <render> elemnt
+ // with the special id of VIEW_ROOT_ID. This is how the client
+ // JavaScript knows how to replace the entire document with
+ // this response.
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement("update", viewRoot);
+ writer.writeAttribute("id", RENDER_ALL_MARKER, "id");
+
+ writer.write("<![CDATA[");
+
+ Iterator<UIComponent> itr = viewRoot.getFacetsAndChildren();
+ while (itr.hasNext()) {
+ UIComponent kid = (UIComponent)itr.next();
+ kid.encodeAll(context);
+ }
+
+ writer.write("]]>");
+ writer.endElement("update");
+ }
+
+ private void renderState(FacesContext context, UIViewRoot viewRoot)
throws IOException {
+ // Get the view state and write it to the response..
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement("update", viewRoot);
+ writer.writeAttribute("id", VIEW_STATE_MARKER, "id");
+ String state =
context.getApplication().getStateManager().getViewState(context);
+ writer.write("<![CDATA[" + state + "]]>");
+ writer.endElement("update");
+ }
+
     private ResponseWriter createPartialResponseWriter() {
 
         FacesContext ctx = FacesContext.getCurrentInstance();
@@ -289,6 +441,15 @@
         return responseWriter;
     }
 
+ private void cleanupAfterView(FacesContext context) {
+ ResponseWriter orig = (ResponseWriter) context.getAttributes().
+ get(ORIGINAL_WRITER);
+ assert(null != orig);
+ // move aside the PartialResponseWriter
+ context.setResponseWriter(orig);
+ }
+
+
     @SuppressWarnings({"FinalPrivateMethod"})
     private final void assertNotReleased() {
         if (released) {
@@ -296,5 +457,75 @@
         }
     }
 
+ // -----------------------------------------------------------
Inner Classes
 
+ private static class PhaseAwareVisitCallback implements VisitCallback {
+
+ private PhaseId curPhase = null;
+ private PhaseAwareVisitCallback(PhaseId curPhase) {
+ this.curPhase = curPhase;
+ }
+
+
+ public VisitResult visit(VisitContext context,
+ UIComponent comp) {
+ try {
+ FacesContext facesContext = context.getFacesContext();
+
+ if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
+
+ // RELEASE_PENDING handle immediate request(s)
+ // If the user requested an immediate request
+ // Make sure to set the immediate flag here.
+
+ comp.processDecodes(facesContext);
+ } else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
+ comp.processValidators(facesContext);
+ } else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
+ comp.processUpdates(facesContext);
+ } else if (curPhase == PhaseId.RENDER_RESPONSE) {
+
+ ResponseWriter writer =
facesContext.getResponseWriter();
+
+ writer.startElement("update", comp);
+ writer.writeAttribute("id",
comp.getClientId(facesContext), "id");
+ try {
+ writer.write("<![CDATA[");
+
+ // do the default behavior...
+ comp.encodeAll(facesContext);
+
+ writer.write("]]>");
+ }
+ catch (Exception ce) {
+ if (LOGGER.isLoggable(Level.SEVERE)) {
+ LOGGER.severe(ce.toString());
+ }
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.log(Level.FINE,
+ ce.toString(),
+ ce);
+ }
+ }
+ writer.endElement("update");
+ }
+ else {
+ throw new IllegalStateException("I18N: Unexpected " +
+ "PhaseId passed to " +
+ "
PhaseAwareContextCallback: " +
+ curPhase.toString());
+ }
+ }
+ catch (IOException ex) {
+ ex.printStackTrace();
+ }
+
+ // Once we visit a component, there is no need to visit
+ // its children, since processDecodes/Validators/Updates and
+ // encodeAll() already traverse the subtree. We return
+ // VisitResult.REJECT to supress the subtree visit.
+ return VisitResult.REJECT;
+ }
+ }
+
 } // end of class PartialViewContextImpl

Index: jsf-ri/src/com/sun/faces/application/ApplicationImpl.java
===================================================================
--- jsf-ri/src/com/sun/faces/application/ApplicationImpl.java
(revision 6089)
+++ jsf-ri/src/com/sun/faces/application/ApplicationImpl.java
(working copy)
@@ -75,7 +75,6 @@
 import javax.faces.render.Renderer;
 import javax.faces.application.Application;
 import javax.faces.application.NavigationHandler;
-import javax.faces.application.PartialTraversal;
 import javax.faces.application.ResourceHandler;
 import javax.faces.application.StateManager;
 import javax.faces.application.ViewHandler;
@@ -167,7 +166,6 @@
 
     private volatile ActionListener actionListener = null;
     private volatile NavigationHandler navigationHandler = null;
- private volatile PartialTraversal partialTraversal = null;
     private volatile PropertyResolverImpl propertyResolver = null;
     private volatile VariableResolverImpl variableResolver = null;
     private volatile ViewHandler viewHandler = null;
@@ -211,7 +209,6 @@
         validatorMap = new ConcurrentHashMap<String, Object>();
         elContextListeners = new CopyOnWriteArrayList<ELContextListener>();
         navigationHandler = new NavigationHandlerImpl(associate);
- partialTraversal = new PartialTraversalImpl();
         propertyResolver = new PropertyResolverImpl();
         variableResolver = new VariableResolverImpl();
 
@@ -674,30 +671,6 @@
     }
 
     /**
- * @see javax.faces.application.Application#getPartialTraversal()
- */
- public PartialTraversal getPartialTraversal() {
- return partialTraversal;
- }
-
-
- /**
- * @see
javax.faces.application.Application#setPartialTraversal(javax.faces.application.PartialTraversal)
- */
- public synchronized void setPartialTraversal(PartialTraversal
partialTraversal) {
-
- Util.notNull("partialTraversal", partialTraversal);
-
- this.partialTraversal = partialTraversal;
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(MessageFormat.format("set PartialTraversal
Instance to ''{0}''",
-
partialTraversal.getClass().getName()));
- }
- }
-
-
- /**
      * @see
javax.faces.application.Application#setPropertyResolver(javax.faces.el.PropertyResolver)
      */
     @SuppressWarnings("deprecation")

Index:
jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java
===================================================================
---
jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java
(revision 6089)
+++
jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java
(working copy)
@@ -54,7 +54,6 @@
 import javax.el.ELResolver;
 import javax.faces.application.Application;
 import javax.faces.application.NavigationHandler;
-import javax.faces.application.PartialTraversal;
 import javax.faces.application.ResourceHandler;
 import javax.faces.application.StateManager;
 import javax.faces.application.ViewHandler;
@@ -274,8 +273,6 @@
                                 addActionListener(app, n);
                             } else if
(NAVIGATION_HANDLER.equals(n.getLocalName())) {
                                 setNavigationHandler(app, n);
- } else if
(PARTIAL_TRAVERSAL.equals(n.getLocalName())) {
- setPartialTraversal(app, n);
                             } else if
(VIEW_HANDLER.equals(n.getLocalName())) {
                                 String viewHandler = getNodeText(n);
                                 if (viewHandler != null) {
@@ -436,31 +433,6 @@
 
     }
 
- private void setPartialTraversal(Application application,
- Node partialTraversal) {
-
- if (partialTraversal != null) {
- String traversal = getNodeText(partialTraversal);
- if (traversal != null) {
- Object instance = createInstance(traversal,
- PartialTraversal.class,
-
application.getPartialTraversal(),
- partialTraversal);
- if (instance != null) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE,
- MessageFormat.format(
- "Calling
Application.setPartialTraversal({0})",
- traversal));
- }
- application.setPartialTraversal((PartialTraversal)
instance);
- }
- }
- }
-
- }
-
-
     private void setViewHandler(Application application,
                                 Node viewHandler) {

Index:
jsf-ri/systest-per-webapp/replace-statemanager/src/java/com/sun/faces/systest/NewApplication.java
===================================================================
---
jsf-ri/systest-per-webapp/replace-statemanager/src/java/com/sun/faces/systest/NewApplication.java
(revision 6089)
+++
jsf-ri/systest-per-webapp/replace-statemanager/src/java/com/sun/faces/systest/NewApplication.java
(working copy)
@@ -313,15 +313,7 @@
 
     }
 
- public PartialTraversal getPartialTraversal() {
- return oldApp.getPartialTraversal();
- }
 
- public void setPartialTraversal(PartialTraversal partialTraversal) {
- oldApp.setPartialTraversal(partialTraversal);
- }
-
-
     public void setVariableResolver(VariableResolver resolver) {
 
     oldApp.setVariableResolver(resolver);

Index:
jsf-ri/systest-per-webapp/replace-application/src/java/com/sun/faces/systest/NewApplication.java
===================================================================
---
jsf-ri/systest-per-webapp/replace-application/src/java/com/sun/faces/systest/NewApplication.java
(revision 6089)
+++
jsf-ri/systest-per-webapp/replace-application/src/java/com/sun/faces/systest/NewApplication.java
(working copy)
@@ -198,14 +198,6 @@
     oldApp.setViewHandler(handler);
     }
 
- public PartialTraversal getPartialTraversal() {
- return oldApp.getPartialTraversal();
- }
-
- public void setPartialTraversal(PartialTraversal partialTraversal) {
- oldApp.setPartialTraversal(partialTraversal);
- }
-
     public StateManager getStateManager() {
     return oldApp.getStateManager();
     }