src/Easy/EasyForm.php
public function render()
    {
        if (!$this->allowAccess())
            return "";
        $this->setClientScripts();

        if ($this->cacheLifeTime > 0 && $this->subForms == null) {
            $cache_id = md5($this->objectName);
            //try to process cache service.
            $cacheSvc = Openbizx::getService(CACHE_SERVICE, 1);
            $cacheSvc->init($this->objectName, $this->cacheLifeTime);
            if ($cacheSvc->test($cache_id)) {
                Openbizx::$app->getLog()->log(LOG_DEBUG, "FORM", "Cache Hit. form name = " . $this->objectName);
                $output = $cacheSvc->load($cache_id);
            } else {
                Openbizx::$app->getLog()->log(LOG_DEBUG, "FORM", "Set cache. form name = " . $this->objectName);
                $output = $this->renderHTML();
                $cacheSvc->save($output, $cache_id);
            }
            return $output;
        }

        //Moved the renderHTML function infront of declaring subforms
        $renderedHTML = $this->renderHTML();

        // prepare the subforms' dataobjs, since the subform relates to parent form by dataobj association
        if ($this->subForms && $this->getDataObj()) {
            foreach ($this->subForms as $subForm) {
                $formObj = Openbizx::getObject($subForm);
                $dataObj = $this->getDataObj()->getRefObject($formObj->dataObjName);
                if ($dataObj)
                    $formObj->setDataObj($dataObj);
            }
        }
        if (!$this->allowAccess()) {
            return "";
        }
        return $renderedHTML;
    }
public function render()
    {
        if (!$this->allowAccess())
            return "";
        $this->setClientScripts();

        if ($this->cacheLifeTime > 0 && $this->subForms == null) {
            $cache_id = md5($this->objectName);
            //try to process cache service.
            $cacheSvc = Openbizx::getService(CACHE_SERVICE, 1);
            $cacheSvc->init($this->objectName, $this->cacheLifeTime);
            if ($cacheSvc->test($cache_id)) {
                Openbizx::$app->getLog()->log(LOG_DEBUG, "FORM", "Cache Hit. form name = " . $this->objectName);
                $output = $cacheSvc->load($cache_id);
            } else {
                Openbizx::$app->getLog()->log(LOG_DEBUG, "FORM", "Set cache. form name = " . $this->objectName);
                $output = $this->renderHTML();
                $cacheSvc->save($output, $cache_id);
            }
            return $output;
        }

        //Moved the renderHTML function infront of declaring subforms
        $renderedHTML = $this->renderHTML();

        // prepare the subforms' dataobjs, since the subform relates to parent form by dataobj association
        if ($this->subForms && $this->getDataObj()) {
            foreach ($this->subForms as $subForm) {
                $formObj = Openbizx::getObject($subForm);
                $dataObj = $this->getDataObj()->getRefObject($formObj->dataObjName);
                if ($dataObj)
                    $formObj->setDataObj($dataObj);
            }
        }
        if (!$this->allowAccess()) {
            return "";
        }
        return $renderedHTML;
    }
Render this form (return html content),
called by WebPage's render method (called when form is loaded).
Query is issued before returning the html content.

@return string - HTML text of this form's read mode
@example ../../../example/FormObject.php