Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #527 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

Id not being set correctly on DeclarativeStyle widgets

Reported by: alberto@… Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TG Widgets Version: 0.9a6
Severity: normal Keywords:


The id tag for new style widgets is not being set correctly when using declarative style. If the name is overriden at the cosntructor it works as expected. Leads to all sorts of weird behaviour... such as a calendarpicker changing the value of an "age" field ;)

class MyFields(W.WidgetsDeclaration):
    name = W.TextField(name="nombre")
    age = W.TextField(validator=V.Int())


<INPUT NAME="name" TYPE="text" CLASS="textfield" VALUE="asd" ID="nombre">
<INPUT CLASS="textfield" TYPE="text" ID="formfield" NAME="age">

(Labels, etc.. omitted for brevity)


name_override_fix.patch Download (1.2 KB) - added by anonymous 13 years ago.

Change History

comment:1 Changed 13 years ago by michele

Yes, now that widget instance is not passed anymore we can fix this by moving the filed_id and field_class thing at update_data time.

I will prepare a patch after lunch (30min) to do this.

Changed 13 years ago by anonymous

comment:2 Changed 13 years ago by anonymous

  • Status changed from new to closed
  • Resolution set to fixed

Fixed at r693 by a patch posted at #490

Note: See TracTickets for help on using tickets.