/**
  * 
  */
 private function _initView($o_result_context)
 {
     $va_options = array('type' => 'O');
     $t_order = new ca_commerce_orders();
     $t_order->set('order_type', 'O');
     $t_order_item = new ca_commerce_order_items();
     // Set drop-down fields to be null-able here so we don't get them auto-setting to their defaults
     $t_order->setFieldAttribute('order_status', 'IS_NULL', true);
     // filtering options
     foreach (array('order_status' => 'string', 'created_on' => 'string', 'loan_checkout_date' => 'string', 'loan_due_date' => 'string', 'loan_return_date' => 'string', 'search' => 'string', 'transaction_id' => 'int', 'user_id' => 'int') as $vs_f => $vs_type) {
         if (array_key_exists($vs_f, $_REQUEST)) {
             $vm_v = $this->request->getParameter($vs_f, pString);
             $o_result_context->setParameter('caClientOrderList_' . $vs_f, $vm_v);
         } else {
             if (!($vm_v = $this->request->getParameter($vs_f, pString))) {
                 $vm_v = $o_result_context->getParameter('caClientOrderList_' . $vs_f);
             }
         }
         // transaction_id may appear in GET requests since the communication editor links to this page with transaction_id as a param
         if ($vs_f == 'transaction_id') {
             $vm_v = $this->request->getParameter($vs_f, pString);
         }
         switch ($vs_type) {
             case 'int':
                 if (strlen($vm_v)) {
                     $vm_v = (int) $vm_v;
                 }
                 break;
         }
         if ($vs_f != 'search') {
             $t_order->set($vs_f, $vm_v);
         }
         $va_options[$vs_f] = $vm_v;
     }
     $this->view->setVar('t_order', $t_order);
     $this->view->setVar('t_order_item', $t_order_item);
     $this->view->setVar('filter_options', $va_options);
     $this->view->setVar('order_list', $va_order_list = $t_order->getOrders($va_options));
     $va_order_ids = array();
     foreach ($va_order_list as $vn_i => $va_order) {
         $va_order_ids[] = $va_order['order_id'];
     }
     $o_result_context->setResultList($va_order_ids);
     $o_result_context->setAsLastFind();
     $o_result_context->saveContext();
     $this->view->setVar('client_services_config', $this->opo_client_services_config = Configuration::load($this->request->config->get('client_services_config')));
     $this->view->setVar('currency', $this->opo_client_services_config->get('currency'));
     $this->view->setVar('currency_symbol', $this->opo_client_services_config->get('currency_symbol'));
 }