[seam-commits] Seam SVN: r14345 - in branches/community/Seam_2_3: jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf and 3 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Mar 6 07:01:32 EST 2012
Author: manaRH
Date: 2012-03-06 07:01:31 -0500 (Tue, 06 Mar 2012)
New Revision: 14345
Modified:
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java
branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/ConversationTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityPassivationTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityTest.java
Log:
reverted patch for JBSEAM-4898
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java 2012-03-01 16:30:19 UTC (rev 14344)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/contexts/Contexts.java 2012-03-06 12:01:31 UTC (rev 14345)
@@ -8,9 +8,6 @@
import java.util.Map;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
import org.jboss.seam.bpm.BusinessProcess;
@@ -94,19 +91,6 @@
public static boolean isPageContextActive()
{
- if (pageContext.get() == null) {
- try {
- // lazy initialize the page context during restore view
- // this is similar to the ViewScopedContext.isActive() in Seam 3
- FacesContext facesContext = FacesContext.getCurrentInstance();
- if (facesContext != null) {
- UIViewRoot viewRoot = facesContext.getViewRoot();
- if (viewRoot != null) {
- pageContext.set( new PageContext() );
- }
- }
- } catch (NoClassDefFoundError e) {} // seam-remote does not have this dependency
- }
return pageContext.get() != null;
}
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java 2012-03-01 16:30:19 UTC (rev 14344)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java 2012-03-06 12:01:31 UTC (rev 14345)
@@ -378,12 +378,6 @@
protected void beforeRestoreView(FacesContext facesContext)
{
FacesLifecycle.beginRequest( facesContext.getExternalContext() );
-
- // this is the same place that WELD restores the conversation
- Map parameters = facesContext.getExternalContext().getRequestParameterMap();
- ConversationPropagation.instance().restoreConversationId(parameters);
- boolean conversationFound = Manager.instance().restoreConversation();
- FacesLifecycle.resumeConversation( facesContext.getExternalContext() );
}
/**
@@ -393,9 +387,9 @@
{
FacesLifecycle.resumePage();
Map parameters = facesContext.getExternalContext().getRequestParameterMap();
-// ConversationPropagation.instance().restoreConversationId(parameters);
+ ConversationPropagation.instance().restoreConversationId(parameters);
boolean conversationFound = Manager.instance().restoreConversation();
-// FacesLifecycle.resumeConversation( facesContext.getExternalContext() );
+ FacesLifecycle.resumeConversation( facesContext.getExternalContext() );
postRestorePage(facesContext, parameters, conversationFound);
}
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java 2012-03-01 16:30:19 UTC (rev 14344)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/AbstractSeamTest.java 2012-03-06 12:01:31 UTC (rev 14345)
@@ -120,11 +120,6 @@
return Manager.instance().isLongRunningConversation();
}
- protected String getConversationIdParameter()
- {
- return "conversationId";
- }
-
/**
* Search in all contexts
*/
@@ -736,11 +731,6 @@
private void restoreViewPhase()
{
- if (conversationId != null)
- {
- setParameter(getConversationIdParameter(), conversationId);
- }
-
phases.beforePhase(new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE));
try
{
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java 2012-03-01 16:30:19 UTC (rev 14344)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/test/java/org/jboss/seam/test/unit/PhaseListenerTest.java 2012-03-06 12:01:31 UTC (rev 14345)
@@ -92,7 +92,7 @@
assert Contexts.isEventContextActive();
assert Contexts.isSessionContextActive();
assert Contexts.isApplicationContextActive();
- assert Contexts.isConversationContextActive();
+ assert !Contexts.isConversationContextActive();
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
@@ -163,7 +163,7 @@
assert Contexts.isEventContextActive();
assert Contexts.isSessionContextActive();
assert Contexts.isApplicationContextActive();
- assert Contexts.isConversationContextActive();
+ assert !Contexts.isConversationContextActive();
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
@@ -226,7 +226,7 @@
assert Contexts.isEventContextActive();
assert Contexts.isSessionContextActive();
assert Contexts.isApplicationContextActive();
- assert Contexts.isConversationContextActive();
+ assert !Contexts.isConversationContextActive();
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
@@ -283,7 +283,7 @@
assert Contexts.isEventContextActive();
assert Contexts.isSessionContextActive();
assert Contexts.isApplicationContextActive();
- assert Contexts.isConversationContextActive();
+ assert !Contexts.isConversationContextActive();
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
@@ -325,7 +325,7 @@
assert Contexts.isEventContextActive();
assert Contexts.isSessionContextActive();
assert Contexts.isApplicationContextActive();
- assert Contexts.isConversationContextActive();
+ assert !Contexts.isConversationContextActive();
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/ConversationTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/ConversationTest.java 2012-03-01 16:30:19 UTC (rev 14344)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/ConversationTest.java 2012-03-06 12:01:31 UTC (rev 14345)
@@ -438,9 +438,4 @@
}.run();
}
-
- protected String getConversationIdParameter()
- {
- return "cid";
- }
}
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityPassivationTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityPassivationTest.java 2012-03-01 16:30:19 UTC (rev 14344)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityPassivationTest.java 2012-03-06 12:01:31 UTC (rev 14345)
@@ -231,11 +231,6 @@
}
- protected String getConversationIdParameter()
- {
- return "cid";
- }
-
@Name("entitytest.nestedComponent")
@Scope(ScopeType.CONVERSATION)
@AutoCreate
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityTest.java 2012-03-01 16:30:19 UTC (rev 14344)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/EntityTest.java 2012-03-06 12:01:31 UTC (rev 14345)
@@ -136,11 +136,6 @@
}
}
- protected String getConversationIdParameter()
- {
- return "cid";
- }
-
@Name("entityExceptionObserver")
public static class EntityExceptionObserver {
More information about the seam-commits
mailing list