예제 #1
0
 /**
  * Render a bizview
  *
  * @param string $viewName name of bizview
  * @param string $rule the search rule of a bizform who is not depent on (a subctrl of) another bizform
  * @return void
  */
 public function renderView($viewName, $form = "", $rule = "", $params = null, $hist = "")
 {
     /* @var $webpage \Openbiz\Easy\WebPage */
     if ($viewName == "__DynPopup") {
         $webpage = Openbiz::getWebpageObject($viewName);
         $webpage->render();
         return;
     }
     $this->setCurrentViewName($viewName);
     $webpage = Openbiz::getWebpageObject($viewName);
     if (!$webpage) {
         return;
     }
     $viewSet = $webpage->getViewSet();
     $this->setCurrentViewSet($viewSet);
     $this->getSessionContext()->clearSessionObjects(true);
     if ($hist == "N") {
         // clean view history
         $webpage->cleanViewHistory();
     }
     if ($form != "" && $rule != "") {
         $webpage->processRule($form, $rule, TRUE);
     }
     if ($params) {
         $webpage->setParameters($params);
     }
     if (isset($_GET['mode'])) {
         // can specify mode of form
         $webpage->setFormMode($form, $_GET['mode']);
     }
     $webpage->render();
 }