I don't know if this can be helpful to you, but TW2 decides the name
of the parameters from the "key" option of the widget.
By default this is equal to the id, but the key can be totally
different so that you can name the arguments your controller will
receive as you wish.

This is especially useful when your argument has a name which is not
valid as a CSS id.

I'm not totally sure about how the key behaves with nested widgets as
I don't remember if it is chained by colons or not, but it might be
the solution to your problem.

On Wed, Jun 20, 2012 at 7:21 PM, Christoph Zwerschke <[email protected]> wrote:
> To quote the TW2 docs, "ToscaWidgets 2 has changed how id and name
> parameters are generated. Just like ToscaWidgets 1, a widget’s full ID is
> generated by combining it’s ID with those of its ancestors. ToscaWidgets 1
> uses underscores as the separator, which causes problems when applications
> use underscores in widget names. ToscaWidgets 2 uses colons as the
> separator, and forbids colons in widget names. In additions, a widget’s full
> name is identical to its full id."
>
> This new behavior is causing me some trouble in TurboGears: I need to remove
> the parent name prefix in all parameter names in my controller methods, and
> I can't use keyword args for these parameters any more.
>
> Has anybody found a simple solution for this problem?
> formencode.variabledecode may be helpful here, but it's still ugly.
>
> -- Christoph
>
> --
> 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.
>

-- 
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