You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ne...@apache.org on 2007/01/30 18:52:03 UTC
svn commit: r501492 - /lenya/trunk/src/modules-core/usecase/usecases.js
Author: nettings
Date: Tue Jan 30 09:51:58 2007
New Revision: 501492
URL: http://svn.apache.org/viewvc?view=rev&rev=501492
Log:
whitenoise, comment fixes, removed redundant declarations, re-enabled
exeption handler that was removed for debugging.
Modified:
lenya/trunk/src/modules-core/usecase/usecases.js
Modified: lenya/trunk/src/modules-core/usecase/usecases.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/usecase/usecases.js?view=diff&rev=501492&r1=501491&r2=501492
==============================================================================
--- lenya/trunk/src/modules-core/usecase/usecases.js (original)
+++ lenya/trunk/src/modules-core/usecase/usecases.js Tue Jan 30 09:51:58 2007
@@ -20,11 +20,11 @@
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
//placeholders for custom flow code:
-var customLoopFlow = undefined;
+var customLoopFlow = undefined;
var customSubmitFlow = undefined;
/**
- * Get the current usecase.
+ * Get usecase.
*
* @param usecaseName, a string
* @return a new org.apache.lenya.cms.usecase.Usecase Avalon component
@@ -60,7 +60,7 @@
}
/**
- * Release a usecase. Since usecases are Avalon Components, they must
+ * Release usecase. Since usecases are Avalon Components, they must
* be released before a continuation is created.
*
* @param usecase, a org.apache.lenya.cms.usecase.Usecase Avalon component
@@ -297,9 +297,6 @@
*/
function executeUsecase() {
- customLoopFlow = undefined;
- customSubmitFlow = undefined;
-
var usecaseName;
var usecase; // the Usecase object
var proxy; // a UsecaseProxy to make the usecase state persistent across continuations
@@ -325,14 +322,14 @@
releaseUsecase(usecase);
}
loadCustomFlow(view);
+ // If the usecase has a view uri, this means we want to display something
+ // to the user before proceeding. This also means the usecase can consist
+ // of several steps; repeated until the user chooses to submit or cancel.
if (view != null && view.getViewURI()) {
- // If the usecase has a view uri, this means we want to display something
- // to the user before proceeding. This also means the usecase can consist
- // of several steps; repeated until the user chooses to submit or cancel.
do {
// show the view:
- loopFlow(view, proxy, generic); //usecase must be released here!
try {
+ loopFlow(view, proxy, generic); //usecase must be released here!
} catch (exception) {
// if something went wrong, try and rollback the usecase:
log("error", "Exception during loopFlow(): " + exception, usecaseName);
@@ -355,8 +352,8 @@
proxy = new Packages.org.apache.lenya.cms.usecase.impl.UsecaseProxy(usecase);
releaseUsecase(usecase);
} while (state == "continue");
- // If the usecase does not have a view uri, we can directly jump to
- // executeFlow().
+ // If the usecase does not have a view uri, we can directly jump to
+ // executeFlow().
} else {
usecase = getUsecase(usecaseName);
proxy.setup(usecase);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org