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 2006/11/01 20:08:05 UTC
svn commit: r470038 - /lenya/trunk/src/webapp/lenya/usecases/usecases.js
Author: nettings
Date: Wed Nov 1 11:08:04 2006
New Revision: 470038
URL: http://svn.apache.org/viewvc?view=rev&rev=470038
Log:
we now handle usecases without a <view/> element correctly.
thanks to jürgen ragaller for spotting the bug.
Modified:
lenya/trunk/src/webapp/lenya/usecases/usecases.js
Modified: lenya/trunk/src/webapp/lenya/usecases/usecases.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/usecases/usecases.js?view=diff&rev=470038&r1=470037&r2=470038
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/usecases.js (original)
+++ lenya/trunk/src/webapp/lenya/usecases/usecases.js Wed Nov 1 11:08:04 2006
@@ -116,11 +116,16 @@
* @param a org.apache.lenya.cms.usecase.UsecaseView object
*/
function loadCustomFlow(view) {
- var flowUri = view.getCustomFlow();
- if (flowUri != null && flowUri != "") { // for some reason, flowUri is not correctly cast into a Boolean, so "if (flowUri)" does not work
- log("debug", "customFlow uri: [" + flowUri + "]");
- //loopFlow = new Function(prepareCustomFlow(flowUri));
- cocoon.load(flowUri);
+ var flowUri;
+ if (view != null) {
+ flowUri = view.getCustomFlow();
+ if (flowUri != null && flowUri != "") { // for some reason, flowUri is not correctly cast into a Boolean, so "if (flowUri)" does not work
+ log("debug", "customFlow uri: [" + flowUri + "]");
+ //loopFlow = new Function(prepareCustomFlow(flowUri));
+ cocoon.load(flowUri);
+ }
+ } else {
+ log("debug", "Usecase does not define a view.");
}
}
@@ -315,7 +320,7 @@
releaseUsecase(usecase);
}
loadCustomFlow(view);
- if (view.getViewURI()) {
+ 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.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org