On 1/5/06, Igor Murashkin <[EMAIL PROTECTED]> wrote:
> That's a good question. You could if you want, but I suppose that would
> make javascript harder. document.form_name['var.name'][0] is slightly
> better then document.form_name['var-1.name']. Plus, I haven't tried
> NestedVariables in complement with @turbogears.expose. If you do it
> like that, then there's no need to unpack your parameters, now is there?
I ask because I'm working on nested forms and I currently handle the
output using the decorator. I'd ideally like to make it so that you
didn't have to set NestedVariables as your validator so the container
validators would act like formencode Schema's chained_values.
It shows up on the form as:
foo.bar-0 : '1'
foo.bar-1 : '2'
foo.bar-2 : '3'
baz :'4'
which would turn into:
params = {
'foo':{bar:['1','2','3']},
'baz':'4'}
using the code snippet I supplied.