[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Tue Jun 19 15:02:32 EDT 2007
User: gavin
Date: 07/06/19 15:02:31
Modified: src/main/org/jboss/seam/core
Conversation.java ConversationEntry.java
ConversationList.java ConversationPropagation.java
ConversationStack.java Events.java Expressions.java
Interpolator.java Manager.java ServletSession.java
TransactionListener.java Validators.java
package-info.java
Removed: src/main/org/jboss/seam/core
AbstractDispatcher.java Actor.java
BusinessProcess.java CronSchedule.java
Dispatcher.java EntityManagerFactory.java
Exceptions.java FacesContext.java
FacesMessages.java FacesPage.java Filter.java
HibernateSessionFactory.java HttpError.java
IsUserInRole.java Jbpm.java
LocalTimerServiceDispatcher.java Locale.java
LocaleSelector.java ManagedHibernateSession.java
ManagedJbpmContext.java
ManagedPersistenceContext.java Messages.java
Navigator.java Pageflow.java Pages.java
PersistenceContextManager.java
PersistenceContexts.java PooledTask.java
PooledTaskInstanceList.java ProcessInstance.java
ProcessInstanceFinder.java QuartzDispatcher.java
Redirect.java RedirectException.java
ResourceBundle.java SafeActions.java Schedule.java
Selector.java ServletContexts.java Switcher.java
TaskInstance.java TaskInstanceList.java
TaskInstanceListForType.java
TaskInstancePriorityList.java
ThreadPoolDispatcher.java TimeZone.java
TimeZoneSelector.java TimerSchedule.java
TimerServiceDispatcher.java Transition.java
UiComponent.java UserPrincipal.java Validation.java
Log:
repackaged built-in components
sorry for breakage, but it had to happen eventually :-(
Revision Changes Path
1.35 +13 -16 jboss-seam/src/main/org/jboss/seam/core/Conversation.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Conversation.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Conversation.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- Conversation.java 22 Feb 2007 19:21:01 -0000 1.34
+++ Conversation.java 19 Jun 2007 19:02:31 -0000 1.35
@@ -7,13 +7,13 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
import org.jboss.seam.annotations.FlushModeType;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Intercept;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.persistence.PersistenceContexts;
/**
* Allows the conversation timeout to be set per-conversation,
@@ -111,12 +111,19 @@
//we need to flush this stuff asynchronously to handle
//nested and temporary conversations which have no
//ConversationEntry
- if ( !Manager.instance().isLongRunningConversation() )
+
+ Manager manager = Manager.instance();
+
+ if ( !manager.isLongRunningConversation() )
{
throw new IllegalStateException("only long-running conversation outcomes are switchable");
}
- ConversationEntry entry = Manager.instance().getCurrentConversationEntry();
+ ConversationEntry entry = manager.getCurrentConversationEntry();
+ if (entry==null)
+ {
+ throw new IllegalStateException("missing conversation entry"); //should never happen
+ }
if (viewId!=null)
{
entry.setViewId(viewId);
@@ -182,8 +189,7 @@
{
end(endBeforeRedirect);
Manager manager = Manager.instance();
- String viewId = manager.getParentConversationViewId();
- return redirect(manager, viewId);
+ return redirect( manager, manager.getParentConversationViewId() );
}
/**
@@ -215,7 +221,7 @@
private void reallyBegin()
{
- Manager.instance().beginConversation( Seam.getComponentName(Conversation.class) );
+ Manager.instance().beginConversation( );
}
/**
@@ -227,7 +233,7 @@
{
if ( Manager.instance().isLongRunningConversation() )
{
- Manager.instance().beginNestedConversation( Seam.getComponentName(Conversation.class) );
+ Manager.instance().beginNestedConversation( );
}
else
{
@@ -266,15 +272,6 @@
}
/**
- * @deprecated use org.jboss.seam.core.Pageflow.begin(String)
- * @param pageflowName
- */
- public void beginPageflow(String pageflowName)
- {
- Pageflow.instance().begin(pageflowName);
- }
-
- /**
* End a long-runnning conversation.
*/
public void end()
1.40 +0 -18 jboss-seam/src/main/org/jboss/seam/core/ConversationEntry.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConversationEntry.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/ConversationEntry.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- ConversationEntry.java 18 Jun 2007 17:27:22 -0000 1.39
+++ ConversationEntry.java 19 Jun 2007 19:02:31 -0000 1.40
@@ -24,7 +24,6 @@
private Date lastDatetime;
private String viewId;
private List<String> conversationIdStack;
- private String initiatorComponentName;
private Integer timeout;
private boolean removeAfterRedirect;
private boolean ended;
@@ -137,23 +136,6 @@
return conversationIdStack;
}
- /**
- * @deprecated
- * @return a component name
- */
- public String getInitiatorComponentName()
- {
- return initiatorComponentName;
- }
-
- /**
- * @deprecated
- */
- void setInitiatorComponentName(String ownerComponentName) {
- entries.setDirty(this.initiatorComponentName, ownerComponentName);
- this.initiatorComponentName = ownerComponentName;
- }
-
public boolean isDisplayable()
{
return !isEnded() && getDescription()!=null;
1.15 +0 -1 jboss-seam/src/main/org/jboss/seam/core/ConversationList.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConversationList.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/ConversationList.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ConversationList.java 10 Jun 2007 19:25:58 -0000 1.14
+++ ConversationList.java 19 Jun 2007 19:02:31 -0000 1.15
@@ -20,7 +20,6 @@
/**
* @author Gavin King
- * @version $Revision: 1.14 $
*/
@Scope(ScopeType.PAGE)
@Name("org.jboss.seam.core.conversationList")
1.2 +3 -2 jboss-seam/src/main/org/jboss/seam/core/ConversationPropagation.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConversationPropagation.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/ConversationPropagation.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ConversationPropagation.java 13 Jun 2007 21:07:33 -0000 1.1
+++ ConversationPropagation.java 19 Jun 2007 19:02:31 -0000 1.2
@@ -12,7 +12,8 @@
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
-import org.jboss.seam.pages.Page;
+import org.jboss.seam.navigation.Page;
+import org.jboss.seam.navigation.Pages;
@Name("conversationPropagation")
@Scope(ScopeType.EVENT)
@@ -66,7 +67,7 @@
//if it is not passed as a request parameter,
//try to get it from the page context
- org.jboss.seam.core.FacesPage page = org.jboss.seam.core.FacesPage.instance();
+ org.jboss.seam.faces.FacesPage page = org.jboss.seam.faces.FacesPage.instance();
conversationId = page.getConversationId();
parentConversationId = null;
validateLongRunningConversation = page.isConversationLongRunning();
1.13 +0 -1 jboss-seam/src/main/org/jboss/seam/core/ConversationStack.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConversationStack.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/ConversationStack.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- ConversationStack.java 10 Jun 2007 19:25:58 -0000 1.12
+++ ConversationStack.java 19 Jun 2007 19:02:31 -0000 1.13
@@ -21,7 +21,6 @@
* Support for "breadcrumbs".
*
* @author Gavin King
- * @version $Revision: 1.12 $
*/
@Scope(ScopeType.PAGE)
@Name("org.jboss.seam.core.conversationStack")
1.28 +4 -0 jboss-seam/src/main/org/jboss/seam/core/Events.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Events.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Events.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- Events.java 31 May 2007 21:05:28 -0000 1.27
+++ Events.java 19 Jun 2007 19:02:31 -0000 1.28
@@ -11,6 +11,10 @@
import org.jboss.seam.annotations.Intercept;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.async.AbstractDispatcher;
+import org.jboss.seam.async.Dispatcher;
+import org.jboss.seam.async.LocalTransactionListener;
+import org.jboss.seam.async.TimerSchedule;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Expressions.MethodExpression;
import org.jboss.seam.core.Init.ObserverMethod;
1.35 +9 -34 jboss-seam/src/main/org/jboss/seam/core/Expressions.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Expressions.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Expressions.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- Expressions.java 12 Jun 2007 18:46:43 -0000 1.34
+++ Expressions.java 19 Jun 2007 19:02:31 -0000 1.35
@@ -1,4 +1,4 @@
-//$Id: Expressions.java,v 1.34 2007/06/12 18:46:43 gavin Exp $
+//$Id: Expressions.java,v 1.35 2007/06/19 19:02:31 gavin Exp $
package org.jboss.seam.core;
import static org.jboss.seam.InterceptionType.NEVER;
@@ -9,9 +9,6 @@
import javax.el.ELContext;
import javax.el.ExpressionFactory;
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
-import javax.faces.validator.ValidatorException;
import org.hibernate.validator.ClassValidator;
import org.hibernate.validator.InvalidValue;
@@ -50,8 +47,7 @@
*/
public ELContext getELContext()
{
- FacesContext facesContext = FacesContext.getCurrentInstance();
- return facesContext==null ? EL_CONTEXT : facesContext.getELContext();
+ return EL_CONTEXT;
}
public ValueExpression<Object> createValueExpression(String expression)
@@ -74,7 +70,7 @@
private javax.el.ValueExpression getExpression()
{
- if ( FacesContext.getCurrentInstance()==null )
+ if ( isFacesContextActive() )
{
if (seamValueExpression==null)
{
@@ -129,7 +125,7 @@
private javax.el.MethodExpression getExpression()
{
- if ( FacesContext.getCurrentInstance()==null )
+ if ( isFacesContextActive() )
{
if (seamMethodExpression==null)
{
@@ -179,6 +175,11 @@
public String getExpressionString();
}
+ protected boolean isFacesContextActive()
+ {
+ return false;
+ }
+
/**
* Validate that a value can be assigned to the property
@@ -232,32 +233,6 @@
}
/**
- * Validate that a value can be assigned to the property
- * identified by a value expression.
- *
- * @param propertyExpression a value expression
- * @param value the value that is to be assigned
- *
- * @throws ValidatorException is validation fails
- */
- public void validate(String propertyExpression, Object value)
- {
- InvalidValue[] ivs;
- try
- {
- ivs = getInvalidValues(propertyExpression, value );
- }
- catch (Exception e)
- {
- throw new ValidatorException( new FacesMessage(FacesMessage.SEVERITY_ERROR, "model validation failed:" + e.getMessage(), null), e );
- }
- if ( ivs.length>0 )
- {
- throw new ValidatorException( FacesMessages.createFacesMessage( FacesMessage.SEVERITY_ERROR, ivs[0].getMessage() ) );
- }
- }
-
- /**
* Gets the validator from the Component object (if this is a Seam
* component, we need to use the validator for the bean class, not
* the proxy class) or from a Model object (if it is not a Seam
1.23 +1 -0 jboss-seam/src/main/org/jboss/seam/core/Interpolator.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Interpolator.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Interpolator.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- Interpolator.java 1 May 2007 16:43:51 -0000 1.22
+++ Interpolator.java 19 Jun 2007 19:02:31 -0000 1.23
@@ -7,6 +7,7 @@
import java.text.MessageFormat;
import java.util.StringTokenizer;
+import org.jboss.seam.international.Locale;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.Component;
1.174 +42 -277 jboss-seam/src/main/org/jboss/seam/core/Manager.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Manager.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Manager.java,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -b -r1.173 -r1.174
--- Manager.java 18 Jun 2007 17:27:22 -0000 1.173
+++ Manager.java 19 Jun 2007 19:02:31 -0000 1.174
@@ -1,28 +1,20 @@
/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
package org.jboss.seam.core;
import static org.jboss.seam.InterceptionType.NEVER;
import static org.jboss.seam.annotations.Install.BUILT_IN;
-import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseId;
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
@@ -34,7 +26,9 @@
import org.jboss.seam.contexts.Lifecycle;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
-import org.jboss.seam.pages.ConversationIdParameter;
+import org.jboss.seam.navigation.ConversationIdParameter;
+import org.jboss.seam.navigation.Pageflow;
+import org.jboss.seam.navigation.Pages;
import org.jboss.seam.util.Id;
/**
@@ -60,8 +54,6 @@
//private boolean updateModelValuesCalled;
- private boolean controllingRedirect;
-
private boolean destroyBeforeRedirect;
private int conversationTimeout = 600000; //10 mins
@@ -151,25 +143,6 @@
}
}
- /**
- * Get the name of the component that started the current
- * conversation.
- *
- * @deprecated
- */
- public Object getCurrentConversationInitiator()
- {
- ConversationEntry ce = getCurrentConversationEntry();
- if (ce!=null)
- {
- return ce.getInitiatorComponentName();
- }
- else
- {
- return null;
- }
- }
-
public List<String> getCurrentConversationIdStack()
{
return currentConversationIdStack;
@@ -420,7 +393,7 @@
{
throw new IllegalStateException("long-running conversation already active");
}
- beginConversation(null);
+ beginConversation();
if (propagation.length()>6)
{
Pageflow.instance().begin( propagation.substring(6) );
@@ -430,7 +403,7 @@
{
if ( !isLongRunningConversation )
{
- beginConversation(null);
+ beginConversation();
if (propagation.length()>5)
{
Pageflow.instance().begin( propagation.substring(5) );
@@ -439,7 +412,7 @@
}
else if ( propagation!=null && propagation.startsWith("nest") )
{
- beginNestedConversation(null);
+ beginNestedConversation();
if (propagation.length()>5)
{
Pageflow.instance().begin( propagation.substring(5) );
@@ -527,21 +500,10 @@
setLongRunningConversation(false);
}
- private String generateInitialConversationId()
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- String viewId = Pages.getViewId(facesContext);
- if ( viewId!=null )
- {
- return Pages.instance().getPage(viewId)
- .getConversationIdParameter()
- .getInitialConversationId( facesContext.getExternalContext().getRequestParameterMap() );
- }
- else
+ protected String generateInitialConversationId()
{
return Id.nextId();
}
- }
private ConversationEntry createConversationEntry()
{
@@ -559,17 +521,14 @@
/**
* Promote a temporary conversation and make it long-running
- *
- * @param initiator the name of the component starting the conversation.
*/
- @SuppressWarnings("deprecation")
- public void beginConversation(String initiator)
+ public void beginConversation()
{
if ( !isLongRunningConversation() )
{
log.debug("Beginning long-running conversation");
setLongRunningConversation(true);
- createConversationEntry().setInitiatorComponentName(initiator);
+ createConversationEntry();
Conversation.instance(); //force instantiation of the Conversation in the outer (non-nested) conversation
storeConversationToViewRootIfNecessary();
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.beginConversation");
@@ -578,11 +537,8 @@
/**
* Begin a new nested conversation.
- *
- * @param ownerName the name of the component starting the conversation
*/
- @SuppressWarnings("deprecation")
- public void beginNestedConversation(String ownerName)
+ public void beginNestedConversation()
{
log.debug("Beginning nested conversation");
List<String> oldStack = getCurrentConversationIdStack();
@@ -593,8 +549,7 @@
String id = Id.nextId();
setCurrentConversationId(id);
createCurrentConversationIdStack(id).addAll(oldStack);
- ConversationEntry conversationEntry = createConversationEntry();
- conversationEntry.setInitiatorComponentName(ownerName);
+ createConversationEntry();
storeConversationToViewRootIfNecessary();
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.beginConversation");
}
@@ -615,14 +570,7 @@
}
}
- private void storeConversationToViewRootIfNecessary()
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- if ( facesContext!=null && Lifecycle.getPhaseId()==PhaseId.RENDER_RESPONSE )
- {
- FacesPage.instance().storeConversation();
- }
- }
+ protected void storeConversationToViewRootIfNecessary() {}
// two reasons for this:
// (1) a cache
@@ -708,32 +656,7 @@
}
}
- /**
- * Temporarily promote a temporary conversation to
- * a long running conversation for the duration of
- * a browser redirect. After the redirect, the
- * conversation will be demoted back to a temporary
- * conversation. Handle any changes to the conversation
- * id, due to propagation via natural id.
- */
- public void beforeRedirect(String viewId)
- {
- beforeRedirect();
-
- FacesContext facesContext = FacesContext.getCurrentInstance();
- String currentViewId = Pages.getViewId(facesContext);
- if ( viewId!=null && currentViewId!=null )
- {
- ConversationIdParameter currentPage = Pages.instance().getPage(currentViewId).getConversationIdParameter();
- ConversationIdParameter targetPage = Pages.instance().getPage(viewId).getConversationIdParameter();
- if ( isDifferentConversationId(currentPage, targetPage) )
- {
- updateCurrentConversationId( targetPage.getConversationId() );
- }
- }
- }
-
- private boolean isDifferentConversationId(ConversationIdParameter sp, ConversationIdParameter tp)
+ protected static boolean isDifferentConversationId(ConversationIdParameter sp, ConversationIdParameter tp)
{
return sp.getName()!=tp.getName() && ( sp.getName()==null || !sp.getName().equals( tp.getName() ) );
}
@@ -812,24 +735,6 @@
}
}
- public void interpolateAndRedirect(String url)
- {
- Map<String, Object> parameters = new HashMap<String, Object>();
- int loc = url.indexOf('?');
- if (loc>0)
- {
- StringTokenizer tokens = new StringTokenizer( url.substring(loc), "?=&" );
- while ( tokens.hasMoreTokens() )
- {
- String name = tokens.nextToken();
- String value = Interpolator.instance().interpolate( tokens.nextToken() );
- parameters.put(name, value);
- }
- url = url.substring(0, loc);
- }
- redirect(url, parameters, true);
- }
-
/**
* Add the parameters to a URL
*/
@@ -894,169 +799,6 @@
}
}
- /**
- * Redirect to the given view id, encoding the conversation id
- * into the request URL.
- *
- * @param viewId the JSF view id
- */
- public void redirect(String viewId)
- {
- redirect(viewId, null, true);
- }
-
- /**
- * Redirect to the given view id, after encoding parameters and conversation
- * id into the request URL.
- *
- * @param viewId the JSF view id
- * @param parameters request parameters to be encoded (possibly null)
- * @param includeConversationId determines if the conversation id is to be encoded
- */
- public void redirect(String viewId, Map<String, Object> parameters,
- boolean includeConversationId)
- {
- /*if ( Lifecycle.getPhaseId()==PhaseId.RENDER_RESPONSE )
- {
- throw new IllegalStateException("attempted to redirect during RENDER_RESPONSE phase");
- }*/
- FacesContext context = FacesContext.getCurrentInstance();
- String url = context.getApplication().getViewHandler().getActionURL(context, viewId);
- if (parameters!=null)
- {
- url = encodeParameters(url, parameters);
- }
- url = Pages.instance().encodePageParameters(
- FacesContext.getCurrentInstance(),
- url,
- viewId,
- parameters==null ? Collections.EMPTY_SET : parameters.keySet()
- );
- if (includeConversationId)
- {
- beforeRedirect(viewId);
- url = encodeConversationId(url, viewId);
- }
- redirect(viewId, context, url);
- }
-
- /**
- * Redirect to the given view id, after encoding the given conversation
- * id into the request URL.
- *
- * @param viewId the JSF view id
- * @param conversationId an id of a long-running conversation
- */
- public void redirect(String viewId, String conversationId)
- {
- FacesContext context = FacesContext.getCurrentInstance();
- String url = context.getApplication().getViewHandler().getActionURL(context, viewId);
- url = encodeConversationId(url, viewId, conversationId);
- redirect(viewId, context, url);
- }
-
- private void redirect(String viewId, FacesContext context, String url)
- {
- url = Pages.instance().encodeScheme(viewId, context, url);
- if ( log.isDebugEnabled() )
- {
- log.debug("redirecting to: " + url);
- }
- ExternalContext externalContext = context.getExternalContext();
- controllingRedirect = true;
- try
- {
- externalContext.redirect( externalContext.encodeActionURL(url) );
- }
- catch (IOException ioe)
- {
- throw new RedirectException(ioe);
- }
- finally
- {
- controllingRedirect = false;
- }
- context.responseComplete();
- }
-
- /**
- * Called by the Seam Redirect Filter when a redirect is called.
- * Appends the conversationId parameter if necessary.
- *
- * @param url the requested URL
- * @return the resulting URL with the conversationId appended
- */
- public String appendConversationIdFromRedirectFilter(String url, String viewId)
- {
- boolean appendConversationId = !controllingRedirect;
- if (appendConversationId)
- {
- beforeRedirect(viewId);
- url = encodeConversationId(url, viewId);
- }
- return url;
- }
-
- /**
- * If a page description is defined, remember the description and
- * view id for the current page, to support conversation switching.
- * Called just before the render phase.
- */
- public void prepareBackswitch(FacesContext facesContext)
- {
-
- Conversation conversation = Conversation.instance();
-
- //stuff from jPDL takes precedence
- org.jboss.seam.pageflow.Page pageflowPage =
- isLongRunningConversation() &&
- Init.instance().isJbpmInstalled() &&
- Pageflow.instance().isInProcess() ?
- Pageflow.instance().getPage() : null;
-
- if (pageflowPage==null)
- {
- //handle stuff defined in pages.xml
- Pages pages = Pages.instance();
- if (pages!=null) //for tests
- {
- String viewId = Pages.getViewId(facesContext);
- org.jboss.seam.pages.Page pageEntry = pages.getPage(viewId);
- if ( pageEntry.isSwitchEnabled() )
- {
- conversation.setViewId(viewId);
- }
- if ( pageEntry.hasDescription() )
- {
- conversation.setDescription( pageEntry.renderDescription() );
- }
- conversation.setTimeout( pages.getTimeout(viewId) );
- }
- }
- else
- {
- //use stuff from the pageflow definition
- if ( pageflowPage.isSwitchEnabled() )
- {
- conversation.setViewId( Pageflow.instance().getPageViewId() );
- }
- if ( pageflowPage.hasDescription() )
- {
- conversation.setDescription( pageflowPage.getDescription() );
- }
- conversation.setTimeout( pageflowPage.getTimeout() );
- }
-
- if ( isLongRunningConversation() )
- {
- //important: only do this stuff when a long-running
- // conversation exists, otherwise we would
- // force creation of a conversation entry
- conversation.flush();
- }
-
- }
-
public String getConversationIdParameter()
{
return conversationIdParameter;
@@ -1093,4 +835,27 @@
return "Manager(" + currentConversationIdStack + ")";
}
+ public void redirect(String viewId, String id)
+ {
+ //declare it here since ConversationEntry calls it!
+ throw new UnsupportedOperationException();
+ }
+
+ public void redirect(String viewId)
+ {
+ //declare it here since Conversation calls it!
+ throw new UnsupportedOperationException();
+ }
+
+ protected void flushConversationMetadata()
+ {
+ if ( isLongRunningConversation() )
+ {
+ //important: only do this stuff when a long-running
+ // conversation exists, otherwise we would
+ // force creation of a conversation entry
+ Conversation.instance().flush();
+ }
+ }
+
}
1.6 +1 -5 jboss-seam/src/main/org/jboss/seam/core/ServletSession.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ServletSession.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/ServletSession.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- ServletSession.java 10 Jun 2007 19:25:58 -0000 1.5
+++ ServletSession.java 19 Jun 2007 19:02:31 -0000 1.6
@@ -1,7 +1,5 @@
package org.jboss.seam.core;
-import javax.faces.context.FacesContext;
-
import org.jboss.seam.Component;
import org.jboss.seam.InterceptionType;
import org.jboss.seam.ScopeType;
@@ -32,12 +30,10 @@
setDirty();
}
- public boolean isInvalidDueToNewScheme()
+ public boolean isInvalidDueToNewScheme(String requestScheme)
{
if (invalidateOnSchemeChange)
{
- FacesContext facesContext = FacesContext.getCurrentInstance();
- String requestScheme = Pages.getRequestScheme(facesContext);
if ( currentScheme==null )
{
currentScheme = requestScheme;
1.8 +2 -2 jboss-seam/src/main/org/jboss/seam/core/TransactionListener.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TransactionListener.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/TransactionListener.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- TransactionListener.java 18 Jun 2007 03:21:33 -0000 1.7
+++ TransactionListener.java 19 Jun 2007 19:02:31 -0000 1.8
@@ -16,11 +16,11 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.async.LocalTransactionListener;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.log.Log;
@@ -128,7 +128,7 @@
}
}
- @Remove @Destroy
+ @Remove
public void destroy() {}
}
1.8 +2 -0 jboss-seam/src/main/org/jboss/seam/core/Validators.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Validators.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Validators.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- Validators.java 19 Jun 2007 06:37:48 -0000 1.7
+++ Validators.java 19 Jun 2007 19:02:31 -0000 1.8
@@ -17,6 +17,8 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.international.Locale;
+import org.jboss.seam.international.ResourceBundle;
/**
* Caches instances of Hibernate Validator ClassValidator
1.2 +1 -1 jboss-seam/src/main/org/jboss/seam/core/package-info.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: package-info.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/package-info.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- package-info.java 15 Nov 2006 06:12:35 -0000 1.1
+++ package-info.java 19 Jun 2007 19:02:31 -0000 1.2
@@ -1,4 +1,4 @@
@Namespace(value="http://jboss.com/products/seam/core", prefix="org.jboss.seam.core")
package org.jboss.seam.core;
-import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.Namespace;
More information about the jboss-cvs-commits
mailing list