cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Klein <>
Subject again: best practice for minor form changes/optional elements
Date Fri, 05 Mar 2004 17:44:47 GMT

I thought I'd give this a second try, since I didn't get any replies the
first time round. I'd appreciate any kind of comment/suggestion. Thanks!
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
The options I can see are: 
1. Have several form templates, one for each variation. Don't like that
very much, too much 
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 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message