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 #501 (closed defect: wontfix)

Opened 13 years ago

Last modified 12 years ago

[PROPOSAL] bound getters and settern for widgets

Reported by: rick.richardson@… Owned by: rick.richardson@…
Priority: normal Milestone: 0.9
Component: TG Widgets Version:
Severity: normal Keywords:


I would like to be able to bind getters and setters of business objects to widgets. This streamlines quite a bit of the workflow in cases where the user is modifying pre-existing business objects

The method i have concocted is to add a bind_get and bind_set to the Widget init. create_dict and input then use these values to do their thing.

It is rather nice to be able to call form.input(args) and the widgets automagically persist the data (provided there are no errors) .

I know it would be possible to subclass Widget and provide the functionality there. But that is a huge pain. I think the bound properties should be a standard in the base class.

I have created a patch that will make the appropriate modifications to base.py. Use it if you want to.


basepy.patch Download (2.4 KB) - added by rick.richardson@… 13 years ago.

Change History

Changed 13 years ago by rick.richardson@…

comment:1 Changed 13 years ago by alberto

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

This patch won't apply in the new widgets API. IMO, this functionality doesn't belong in the widgets but in the controller code. However, Kevin should decide on this

Note: See TracTickets for help on using tickets.