[seam-commits] Seam SVN: r15439 - in branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam: jsf and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Mar 5 11:15:46 EST 2013
Author: manaRH
Date: 2013-03-05 11:15:46 -0500 (Tue, 05 Mar 2013)
New Revision: 15439
Modified:
branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java
branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
Log:
bz911013 performance improvements
Modified: branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java
===================================================================
--- branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java 2013-03-04 13:37:57 UTC (rev 15438)
+++ branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/international/StatusMessages.java 2013-03-05 16:15:46 UTC (rev 15439)
@@ -13,6 +13,7 @@
import javax.validation.ConstraintViolation;
import org.jboss.seam.Component;
+import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.international.StatusMessage.Severity;
/**
@@ -371,17 +372,15 @@
protected static void runTasks()
{
- Component component = Component.forName(StatusMessages.COMPONENT_NAME);
- if( component != null && !component.getScope().isContextActive() )
- {
- return;
+ if ( Contexts.isConversationContextActive() )
+ {
+ //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
+ StatusMessages statusMessages = instance();
+ if ( statusMessages != null )
+ {
+ statusMessages.doRunTasks();
+ }
}
- //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
- StatusMessages statusMessages = instance();
- if ( statusMessages != null )
- {
- statusMessages.doRunTasks();
- }
}
protected void doRunTasks()
@@ -395,12 +394,10 @@
public static StatusMessages instance()
{
- Component component = Component.forName(StatusMessages.COMPONENT_NAME);
- if(component != null && !component.getScope().isContextActive())
+ if ( !Contexts.isConversationContextActive() )
{
- throw new IllegalStateException("No active "+component.getScope().name()+" context");
+ throw new IllegalStateException("No active conversation context");
}
- //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
return (StatusMessages) Component.getInstance(COMPONENT_NAME);
}
Modified: branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
===================================================================
--- branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java 2013-03-04 13:37:57 UTC (rev 15438)
+++ branches/enterprise/WFK-2_1/jboss-seam/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java 2013-03-05 16:15:46 UTC (rev 15439)
@@ -187,12 +187,7 @@
@Override
public UIViewRoot restoreView(FacesContext ctx, String viewId)
{
- UIViewRoot viewRoot =viewHandler.restoreView(ctx, viewId);
- if (viewRoot != null)
- {
- viewRoot.setViewId(viewHandler.deriveViewId(ctx,viewId));
- }
- return viewRoot;
+ return viewHandler.restoreView(ctx, viewId);
}
@Override
More information about the seam-commits
mailing list