Hi again,
I'm having issues with toscawidgets validation... And I don't understand
why this is happening as it does.
It's also kind of complicated to explain, but I'll try:
I have a widget 'judgement_form' (with ToscaWidgets1) that uses
tw.dynforms.GrowingTableFieldSet (see the source here:
http://pastie.org/3781355).
The corresponding controller is decorated to perform validation using
the form widget:
@validate(judgement_form)
@expose('sauce.templates.submission_judge')
def judge(self, **kwargs):
...
Because I needed three distinguishable submit buttons, I created a
little ButtonTable(TableForm) that just renders these three buttons side
by side, nothing too fancy, but it works. Now when validation is turned
on, a fielderror "Missing value" gets rendered for that
SubmitButtonTable (even in a GET request). See on this screenshot:
http://i.imgur.com/Ji6cw.pngBut if I specify validator = None in the SubmitButtonTable, the whole
widget doesn't get validated. (Which I see at the GrowingTableFieldSet,
which values don't get parsed into a dict by the default
StripDictValidator('grow', if_missing=[])). Setting this validator
manually doesn't make a difference (see source)
So the problem is:
I either get no validation at all and it doesn't work
or
It works, but I get an annoying field error that I'd like to get rid of.
Has someone had similar problems or could give me a clue about what I'm
doing wrong?
I'd be grateful for some help!
Regards,
Moritz
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to
turbogears@....
To unsubscribe from this group, send email to
turbogears+unsubscribe@....
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.