On Fri, 2001-12-14 at 14:54, Aaron Held wrote:
> From: "Matt Feifarek" <mjf@...>
> > | Is it easy/possible to integrate with complex form layout?
> > | (i.e, is the presentation separate from the form logic?)
> >
> > Not really. We did this, and basically wrote wrapper classes using a
>
> You can use Cheetah -
> in your servlet
> rf = self.renderableForm(defaults=defaults, optionSet=options)
> t = Template(file=templateFile,searchList=[{'rf':rf, 'user':userToView}])
>
> and in the template:
> <tr><td align="right" valign="top" class="label">$rf['username'].description:</td><td>$rf['username'] $rf
Yes, this is how you're supposed to template FFK, generally. It should
be possible to use $rf.username (instead of $rf['username']) as well.
I've generally been satisfied enough with htFormTable, but Jeff Johnson
has used it with Cheetah in this way.
htFormTable only provides very simple layout, so really the intention is
that you use something else for more complicated layout -- though I'm
open something inbetween htFormTable and a full templating language.
Someone suggested that before.
The one place where, currently, you can't get control is with
multi-checkbox and radio fields, because I haven't decided on what the
interface to access subelements might be. The same problem exists for
grouped/repeating fields.
Ian
|