You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Krzysztof Zielinski <kz...@supermedia.pl> on 2001/02/12 09:42:00 UTC
Re: generator based including
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