Aliases name and label are used for Dojo to feed the dojo ItemFileWriteStore that later will be a source for dojo combo box dropdown. Basically its a dropdown element programming.
PHP Code:
// server side
$db = Zend_Registry::get('db');
$select = $db->select()->distinct();
$select->from(array('wo' => 'WO'), array(
'name' = 'wo.ITEM',
'label' => 'wo.ITEM',
)
);
$select->having('LENGTH(TRIM(name))>0');
$select->order('name ASC');
$stmt = $db->query($select);
$rows = $stmt->fetchAll();
$dojoData = new Zend_Dojo_Data('name', $rows, 'label');
print $dojoData;
exit;
Bookmarks