cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krzysztof Zielinski" <kzielin...@supermedia.pl>
Subject Re: generator based including
Date Mon, 12 Feb 2001 08:42:00 GMT
Hi.

It's very interesting "form taglib".

> Let's say I have main page "wizard" that has two forms in it.
> A login form and a order form (whatever)
>
>   wizard page
>     +- login form +- login view
>     |             +- logout view
>     |
>     +- order form +- page1 view
>                   +- page2 view
>                   +- submit view
>
> With views like this:
>
> login:
>    <form action="process-loginform">
>      <input name="process" type="hidden" value="viewlogout"/>
>      <input type="submit"/>
>    </form>
>
> logout:
>    <form action="process-loginform">
>      <input name="process" type="hidden" value="viewlogin"/>
>      <input type="submit"/>
>    </form>
>
> page1:
>    <form action="process-orderform">
>      <input name="process" type="hidden" value="viewpage2"/>
>      <input type="submit"/>
>    </form>
>
> page2:
>    <form action="process-orderform">
>      <input name="process" type="hidden" value="viewsubmit"/>
>      <input type="submit"/>
>    </form>
> submit:
>    Thanks!
>
> So my sitemap is:
>
>    <map:match pattern="forms/wizard">
>      <map:act set="login"/>
>      <map:act set="order"/>
>      <map:generate type="serverpages"
src="docs/samples/forms/wizard.xsp"/>
>      <map:transform src="stylesheets/dynamic-page2html.xsl"/>
>      <map:serialize/>
>    </map:match>
>
> With two action sets:
>
>  <map:act set="login">
>     <map:act type="doLogout" action="viewlogin"/>
>     <map:act type="doLogin" action="viewlogout"/>
>     <map:generate src="{nextview}"/>
>  </map:act>
>
>  <map:act set="order">
>     <map:act type="checkPage1" action="viewpage2"/>
>     <map:act type="checkPage2" action="viewsubmit"/>
>     <map:generate src="{nextview}"/>
>  </map:act>
>
> And then implement the actions "doLogout","doLogin",
> "checkPage1","checkPage2" which all return a "nextview"

Can I find somewhere example code this solution?

Regards.

Kris.
kzielinski@supermedia.pl



Mime
View raw message