A dropdown/select/option list is called a combobox in ExtJS speak.
Here's an example I copy/pasted from my current project:
FrontDeskMan.combo.RoomTypes = function(config) {
config = config || {};
Ext.applyIf(config,{
url: FrontDeskMan.config.connectorUrl,
baseParams: {
action: 'mgr/roomtype/getcombo',
property: config.property,
emptyOption: config.emptyOption || false
},
fields: ['id','name'],
hiddenName: config.name || 'roomtype',
pageSize: 15,
valueField: 'id',
displayField: 'name'
});
FrontDeskMan.combo.RoomTypes.superclass.constructor.call(this,config);
};
Ext.extend(FrontDeskMan.combo.RoomTypes,MODx.combo.ComboBox);
Ext.reg('frontdeskman-combo-roomtypes',FrontDeskMan.combo.RoomTypes);[
(in that case use xtype: 'frontdeskman-combo-roomtypes' as your editor)
and the processor works pretty much the same as grid processors.. ie:
$count = $modx->getCount('fdmRoomType');
$roomtypes = $modx->getCollection('fdmRoomType');
foreach ($roomtypes as $obj) {
/* @var fdmRoomType $obj */
$results[] = $obj->toArray('', false, true);
}
$returnArray = array(
'success' => true,
'total' => $count,
'results' => $results
);
return $modx->toJSON($returnArray);
but then most likely setting the limit/start on a query and things like that.