How to load options with scheduler.serverList?

Hi, I’m trying to figure out how I can load a list of user id and usernames from Joomla’s default database. So far, using this forum and the documentations, I wrote some custom code and modified some of the source code to try to get it working…

Here’s my scheduler_include.html code for the lightbox form.

... scheduler.config.lightbox.sections=[ { name: "tech", type:"select", map_to: "tech_id", options: scheduler.serverList("tech"), focus: true }, ... ]

And then here are the relevant dhtmlxSchedulerConfigurator.php code for loading server-side data.

public function getEventsRec($usergroups) {
$this->scheduler->event->attach("beforeRender", Array($this, "posts_table_builder"));
$this->scheduler->event->attach("beforeRender", grab_users()); // my custom code

private function grab_users() { // this is at the bottom of dhtmlxSchedulerConfigurator.php script
        $techList = new OptionsConnector($this->connection);
        $techList->render_table("hvh_users", "id", "id,username");
        $this->scheduler->set_options("tech", $techList);

So far I can’t get my “Tech” select menu to output a list of Joomla’s registered users. Any idea how I can get it working?

if function is a member of the class, code must look as

$this->scheduler->event->attach("beforeRender", array($this, "grab_users")); 

for standalone function

$this->scheduler->event->attach("beforeRender", "grab_users"); 

How can I get options (value-label pairs) from model in Yii framework if i use “PHPYii”? Need rewrite this

$options = new OptionsConnector($res); $options->render_table("people","id","id(value),name(label)"); $grid->set_options("coro_column",$options);

for Yii. Does ‘OptionsConnector’ work for Yii?

Does ‘OptionsConnector’ work for Yii?
Yes, you need to provide a Model object instead of $res
Also, you can use arbitrary code to fetch values and feed set_options with array of values … _with_data