#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):
Well, I've stumbled upon a wall I cannot cross unless:
a) Id can be overriden at display
b) I instantiate new widgets on every request.
What I'm trying to accomplish is a cross between a fastdatagrid and a
form. Let me explain: A form is defined with fields A, B and C. The form
receives a SelectResults as value and renders each record as a row whith
columns A, B, C. These <td>s can be edited by clicking on them, which
causes the <span> to become an input widget (as defined by the form
fields) which gets submitted asyncronously when it loses focus.
As you can see, every input widget is rendered N times (where N is the
number of rows) causing N id collisions :( One soulution, as I've
mentioned, would be to override the id at display, another would be to
generate the N*M widgets at form's display time (cloning them from the
Form)... yuck! :(
Maybe I'm doing something crazy... am I?
If not, any idea how could I implement this without patching widgets? I
guess that the only thing it'll be needed is to make 'id' overridable at
*display* time. Is there any way to get around the label/id limitatation?
I'm beginning to think we went too far with supporting the nested widgets
scenario (probably, err, most probably my fault) and this is becoming an
obstacle in designing other types of widgets :(
Alberto
--
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
-~----------~----~----~----~------~----~------~--~---