hi everyone!

i would like to enable continuations for usecases that employ a uri view, so that they behave just like usecases with jxtemplate views.

please review the attached (trivial) patch and share your insights.


a quick grep through the lenya source shows that only 3 other usecases use uri views:

[EMAIL PROTECTED]:/srv/lenya/src> grep -r "<view.*uri" *

modules/bxe/config/cocoon-xconf/usecase-bxe.xconf:
  <view uri="cocoon://modules/bxe/bxe.open" menu="false"/>
modules/bxe/config/cocoon-xconf/usecase-bxe-close.xconf:
  <view uri="cocoon://modules/bxe/bxe.close" menu="false"/>
modules-optional/jcrsource/config/cocoon-xconf/usecase-export.xconf:
  <view uri="cocoon://modules/jcrsource/lenya-repository-content.xml"
        menu="false"/>

i'm not sure what will happen to them. my guess is they should Just Work, but i can't test it atm.


regards,

jörn



--
"Open source takes the bullshit out of software."
        - Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: [EMAIL PROTECTED], Telefon: 0203/379-2736
Index: src/webapp/lenya/usecases/usecases.js
===================================================================
--- src/webapp/lenya/usecases/usecases.js       (revision 441201)
+++ src/webapp/lenya/usecases/usecases.js       (working copy)
@@ -190,10 +190,14 @@
                     if (viewUri.startsWith("cocoon:/")) {
                         viewUri = viewUri.substring(new 
Packages.java.lang.String("cocoon:/").length());
                     }
-                    cocoon.sendPage(viewUri, {
+                    if (cocoon.log.isDebugEnabled())
+                        cocoon.log.debug("usecases.js::executeUsecase() in 
usecase " + usecaseName + ", creating view, calling Cocoon with viewUri = [" + 
viewUri + "]");
+                    
+                    cocoon.sendPageAndWait(viewUri, {
                             "usecase" : proxy
                         });
-                    return;
+                    //cocoon.sendpage(viewUri, { "usecase" : proxy });
+                    //return;
                 }
             }
             catch (exception) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to