You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Klein <kl...@web.de> on 2004/03/02 16:16:26 UTC
best practice for minor form changes/optional elements
Hi,
just wondering whether anyone has got any thoughts on this/best practices to offer:
I have got a woody form that I need to display in very slight variations, e.g. a certain button
should only be visible under certain conditions that I can check in my flow.
The options I can see are:
1. Have several form templates, one for each variation. Don't like that very much, too much
duplication.
2. Send a request parameter to the formpipeline. Assign an extra attribute "req-param" to the
optional elements <wt:widget id="optionalbutton" filter:req-param="optionalbutton"/>. Then
write a transform that checks for the "req-param" attribute and filters the corresponding element
if no request parameter by that name is given.
3. Use jxtemplate generator to generate the formtemplate and use the context object to pass a
value that determines whether to display a certain element or not. Inside the jxtemplate I'd
enclose the element in an if-statement.
Any thoughts? Thanks a lot
Stefan
______________________________________________________________________________
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org