hi everyone!

here's a first attempt at cleaning up usecases.js:
http://people.apache.org/~nettings/usecases.js

as you can see, i've put some repetitive stuff into functions and ripped out cforms-specific code. all other usecases work.

as to cforms, i'm planning to add a generic solution for custom flowscripts, inspired by the existing mechanism of <intro/> and <outro/>, which should be ok for cforms. if it works out like i think it should, you will be able to pass two urls with custom flowscript snippets to the usecase declaration - one for the main loop, and the other for the "submit" case.

i'd also like to get rid of the duplicate view methods (<view template=""../> and <view uri="".../>). both do almost the same now anyway. the remaining one (i'm favouring "uri") will take a protocol-less uri that will be fed to the root sitemap if it starts with a slash, and to the usecases.xmap if not. this will make our framework consistent with the cocoon documentation. any objections?

doug has recently requested an option to switch from sendPageAndWait to sendPage, to cater to one-shot usecase views. is that a purely hypothetical scenario, or will people use it? i can add an option, but i'd like to avoid creating dead code.

here's how the xconf view declaration might look:

<view uri="/modules/foo/usecases/foo-mogrify.jx"
      loopFlow="/modules/foo/flow/mainLoop.js"
      submitFlow="/modules/foo/flow/submit.js"
      menu="false|true"
      createContinuation="false|true"
/>

where createContinuation and submitFlow are mutually exclusive.

this approach will also eliminate the cforms-specific code in UsecaseView.

if anybody is using custom variants of the cforms module for some more advanced stuff, i would be glad to hear about them, in order to find out about limitations in my outline.

as always, comments and improvements appreciated.


jörn


--
"It's sad to behold how lately the wonderful English language has,
in the hands of corporate executives and marketing experts, re-
adjusted its prospective itinerary towards mythical subterranean
realms of discomfort, leveraging traditional woven containment
devices."

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: [EMAIL PROTECTED], Telefon: 0203/379-2736

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

Reply via email to