On Mon, Jun 25, 2012 at 4:30 PM, Christoph Zwerschke <[email protected]> wrote:
> Am 25.06.2012 12:53, schrieb Alessandro Molina:
>
>> I think it is probably a tw2 bug as the right behavior is the one you
>> get when you don't specify the id. The id of the root element should
>> probably not be added to the field names.
>
>
> As far as I understand that's considered a feature of TW2, not a bug (see
> http://tw2core.readthedocs.org/en/latest/history/#consistency-in-ids-and-names)
>

The id generation using colons is a feature, but the id of Form class
should probably be skipped as far as I have been able to understand.
The toscawidgets ML is a good place where to discuss this and find a
stable solution.

> By the way, is anybody working on a TW2 version of the forms tutorial
> (http://turbogears.org/2.1/docs/main/ToscaWidgets/forms.html) already? If
> not, I'm volunteering to do it.
>

Should have been already updated in new doc
(http://turbogears-dev.readthedocs.org/en/latest/main/TwForms.html)
if you find anything wrong feel free to change it, it has been created
on TW2.0 and TW2.1 release might have changed something.


> So the proper usage of TW2 is to pass a form class to the page template, not
> a form instance:
> This is another thing that we need to document properly, as it is not really
> obvious.
>

Yep, the current TG2.2 form documentation already has examples that
pass around the class itself.
In TW2 you are expected to always use the class of the widgets
wherever you used a widget instance before.
The class itself has the display staticmethod and so on.

-- 
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?hl=en.

Reply via email to