On 21/04/2006, at 19:57, Michele Cella wrote:
>
> jvanasco wrote:
>> well I've seen widgets change slightly througout the .9 releases - i
>> know its alpha, but things seem to fluctuate far too much for my
>> tastes
>>
>> I understand the FormFieldsContainer compound widget - but to me, it
>> shows how awkward some form stuff is in TG. You end up with a few
>> defs
>> and classes for one form.
Seems to me you want everything under the same class, right? let's
see what we can come up with...
class MyAllInOneForm(TableForm):
template = "your template, layout precisely every fields to your
liking"
fields = [
TextField("name", validator=String()),
TextField("age", validator=Int()),
FieldSet("other_data", fields = [
CalendarDateTimePicker("date"),
...
]
]
validator = Schema(
chained_validators = [FieldsMatch("field1", "field2")]
)
Happy? I'm sure that after writing a couple tenths of these you might
find useful to factor some common stuff into separate classes for
reuse, but who knows, everyone's different.... maybe you like to type
and maintain hundredths lines of code...
Alberto,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---