Hi all,

I need some help to get SelectShuttle widget works.
How 'available_options' and 'default' params work?
I tried to assign to them the value returned from two functions but it 
works well only the first time.
I tried to assign to them the two functions but I got this error message:

File "/home/jose/turbosicer-oct/sicer/widgets/selectshuttle/widgets.py", 
line 172, in <lambda>

    not_selected = lambda x: x not in selected_opts
TypeError: iterable argument required


what's wrong?


thanks for any help.
jo

=====================================================================================================
def dispon():
    result=[(rec.permission_id, rec.permission_name) for rec in 
session.query(Permesso).select()]
    return result

def assegn():
    result=[(rec.permission_id, rec.permission_name) for rec in 
session.query(WassignedPerms).select()]
    return result

editForm = TableForm(action='save',
    fields = [
        widgets.HiddenField(name='id'),
        widgets.Label(name='cliente',label='codice utente'),
        SelectShuttle(
            name = 'permessi_options',
            available_options=dispon(),
            default = dict(selected = assegn() ),
            title_selected = 'Permessi assegnati',
            title_available = 'Permessi non assegnati',
            label=''
            ),
        widgets.SubmitButton(name='submit_save', default='Salva', label=''),
        ],
    )


--~--~---------~--~----~------------~-------~--~----~
 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