Hello all,

I'm starting from the wiki article on dynamically building the option
lists in a multiple select field.
http://trac.turbogears.org/turbogears/wiki/PassingArgumentsToCallables

However, what I'm doing now involves 2 modifications:
1.  I want the string part of the select field to be the synthesis of 2
DB fields.  What I did here was to create a custom build_list()
function on my SQLObject.  OK.

2.  I want to be able to dynamically change the filter on the return
list.  From the wiki page, what I want to be able to do is something
like:
# Only list colors that have some red in them, and sort alphabetically.
widget = SingleSelectField('colors', options=make_list(Color, None,
'name',
        Color.q.r > someVarible, orderBy=Color.q.name)
where I have changed "Color.q.r > 0" to "Color.q.r > someVariable".

I'm hoping to keep this all in my code, but I'm having a hard time
finding a thread safe solution.  I'm leaning towards creating a JSON
call and dynamically building the list on the client side.  Any other
ideas?

Chris


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

Reply via email to