function ProcessRequest() { $msg = Messenger::Instance()->Receive(__FILE__); if ($msg) { $return['Pesan'] = $msg[0][1]; $return['Data'] = $msg[0]; } else { $return['Pesan'] = null; $return['Data'] = null; } $decUsr = Dispatcher::Instance()->Decrypt($_REQUEST['usr']); if ($decUsr == '') { $decUsr = Dispatcher::Instance()->Decrypt($return['Data']['0']['usr']); } $applicationId = Configuration::Instance()->GetValue('application', 'application_id'); $userObj = new AppUser(); $dataUser = $userObj->GetDataUserById($decUsr); $dataUnitKerja = $userObj->GetComboUnitKerja($applicationId); if (isset($dataUser['0']['unit_kerja_id'])) { $unit_selected = $dataUser['0']['unit_kerja_id']; } else { $unit_selected = $return['Data']['0']['unit_kerja']; } Messenger::Instance()->SendToComponent('combobox', 'Combobox', 'view', 'html', 'unit_kerja', array('unit_kerja', $dataUnitKerja, $unit_selected, 'false', 'onChange="updateGroup();"', false, '', '', '', ''), Messenger::CurrentRequest); if (isset($unit_selected)) { $data_combo_group = $userObj->GetDataGroupByUnitId("", $unit_selected, $applicationId); if ($_REQUEST['usr'] == '') { $group_selected = $return['Data']['0']['group']; } else { $group_selected = $dataUser['0']['group_id']; } } else { $group_selected = null; $data_combo_group = null; } Messenger::Instance()->SendToComponent('combobox', 'Combobox', 'view', 'html', 'group', array('group', $data_combo_group, $group_selected, 'false', '', '', '', ''), Messenger::CurrentRequest); $return['dataUser'] = $dataUser; return $return; }