#902: [PATCH] All input widgets should have a "field_id" param to allow
overriding the DOM element's id
---------------------+------------------------------------------------------
Reporter: alberto | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: Widgets | Version: 0.9a5
Severity: major | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Comment (by alberto):
> Anyway if you want such a thing please consider using "id" or
"widget_id" but not
> "field_id", in this case using "id" everywhere and deprecating
"field_id" will be
> the best thing to do IMHO. ;)
Forgot to mention that... Surely field_id looks awkward in a non-form
Widget... I like {{{id}}} better, as it should set the {{{id}}} attr of
the widget's root node.
Regarding the name/id issue, the problem is that I need to *force* an id
on a widget, cannot let the form autogenerate it because I store the row's
id on every field for that row for the JS code to parse.
So, maybe a crack-full idea, but here it goes:
* "name" moves form Widget to FormField, as only FormFields (<input> or
similar tags) have a "name" attribute associated to it's DOM elemement
(right?).
* Widget gets a new "id" parameter to set the id of the widget's root DOM
element. This makes sense to me because any DOM element can have and
"id"...
* The "id" argument to the constructor is optional, if None is passed, an
automatic id will be generated (like it's currently done)
Opionions?
Be sending a patch soon with this proposed changes...
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/902>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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-tickets
-~----------~----~----~----~------~----~------~--~---