How to populate a selectBox dynamically?

Please see this thread for more details.