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!

On Nov 9, 10:10 pm, notnow <[email protected]> wrote:
> 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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to