button in columns of a tw.jquery flexigrid

6 views
Skip to first unread message

notnow

unread,
Nov 9, 2009, 11:10:35 PM11/9/09
to TurboGears
Everything is working good with the grid and the buttons are id'd and
capable of href to a template that includes an item selector. The id
of the button is the id of the record that will be used to filter data
for the item selector. Is there any easyway to pass that button id to
the template with the item selector? I can think of a possible work-a-
round with javascript, and dummy forms, but there has to be an easier
way.

notnow

unread,
Nov 12, 2009, 4:48:58 PM11/12/09
to TurboGears
I think I found the answer and now feel stupid it was in the docs
http://turbogears.org/2.1/docs/main/Controllers.html#writing-controllers
probably the most important doc of turbogears.
I now have another problem instantiating this same widget. This is my
class with the widget

Any help would be appreceated.

class Club_Selector(ItemSelector):
def __init__(self,schools_id):
self.schools_id=schools_id
ItemSelector.__init__(self,divID='item_selector_div',
width=600,
url='/save',
fieldLabel='Clubs',
labelWidth=80,
fromData=[],
toData=[],
msWidth=200,
msHeight=200,
dataFields=['code','desc'],
valueField='code',
displayField='desc',
fromLegend='Available',
toLegend='Selected',
submitText='Save',
resetText='Reset')

which raises the following error:

ValueError: ItemSelector requires a divID!
Reply all
Reply to author
Forward
0 new messages