Kevin Horn, el 21 de febrero a las 10:46 me escribiste:
> Could you maybe have one bit of JS that sets the focus, and then add a param
> to the widget that takes the DOM id of the field you want to set the focus
> to?  Then you could pass different Dom ids for each page/view from your
> controller.
> 
> I haven't used params for widgets a whole lot, but this seems like the way
> to do it to me.

Yes, that could be an option, but I like the subclassing better. My main
question is if there is any technical reason to not let the user override
javascript attribute in the TableForm constructor (like the fields) or is
just that it's not implemented.

And maybe, it could be a good feature to (optionally) add an option to the
widget to get focus on page load (or to the form, something like
TableForm(fields=[TextField(name="name"), TextField(name="age")],
focus="name"). You can even have focus=True as a shortcut to focus the
first TableForm widget or the first widget with a validation error. Just
thinking out loud =)

-- 
LUCA - Leandro Lucarella - Usando Debian GNU/Linux Sid - GNU Generation
------------------------------------------------------------------------
E-Mail / JID:     [EMAIL PROTECTED]
GPG Fingerprint:  D9E1 4545 0F4B 7928 E82C  375D 4B02 0FE0 B08B 4FB2 
GPG Key:          gpg --keyserver pks.lugmen.org.ar --recv-keys B08B4FB2
------------------------------------------------------------------------
The biggest lie you can tell yourself is
When I get what I want I will be happy

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