cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes" <Un...@hippo.nl>
Subject RE: Fooling around with cocoon davmap
Date Wed, 05 Nov 2003 11:19:15 GMT
 

> 
> -----Original Message-----
> From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net] 
> Sent: maandag 3 november 2003 13:16
> To: dev@cocoon.apache.org
> 
> Sylvain Wallez wrote:
> 
> > Vadim Gritsenko wrote:
> >
> >> Sylvain Wallez wrote:
> >
> >
> > <snip/>
> >
> >>> Uh (again)? I'm wondering if there's not a misunderstanding here: 
> >>> this FIXME is about knowing if a flowscript is allowed to 
> terminate 
> >>> without stating what page it to be displayed, i.e. check 
> if one of 
> >>> sendPage(), sendPageAndWait() or redirectTo() was called.
> >>
> >>
> >>
> >>
> >> I think that flow should cover as many features of the actions as 
> >> possible, and for this, it should be allowed not to redirect (as 
> >> actions are allowed to do):
> >>
> >> <map:call method="doSomething"/>
> >> <map:generate/>
> >> <map:transform/>
> >> <map:serialize/>
> >
> >
> >
> > Mmmh... in that case, we need a flowscript function to 
> return a Map of 
> > sitemap variables. Shouldn't it be better to have a 
> > "flowscript-action" that would call a function (and not a
> > continuation) and would share global variables with 
> flowscript while 
> > not being allowed to call sendPageAndWait()?
> 
> 
> Hmm...
> 
> <map:call method="login">
>   <map:generate src="protected.xml"/>
>   <map:transform/>
>   <map:serialize/>
> </map:call>
> 
> login () {
>   while (!loggedin) {
>     sendPageAndWait("login");
>     loggedin = ...
>   }
>   return ('username': username, 'profile': profile);
> }
> 
> 
> You mean something like this? No objections so far. :)
> What flowscript method returns currently?
> 

This looks pretty cool. But let's avoid the action semantic that says
returning null will continue processing outside the call function node
but instead have returning null signal the end of the response. This
will solve the body-less response issue elegantly as well:

function options() {
  cocoon.response.setHeader("DAV","1");
  cocoon.response.setHeader("Allow","OPTIONS,GET,PUT,DELETE");
  cocoon.response.setStatus(204);
  return null;
}

-- Unico

> Vadim
> 
> 
> 
> 

Mime
View raw message