Prado\Web\UI\WebControls\TTabPanel::registerClientScript PHP Method

registerClientScript() protected method

Registers the relevant JavaScript.
protected registerClientScript ( )
    protected function registerClientScript()
    {
        $id = $this->getClientID();
        $options = TJavaScript::encode($this->getClientOptions());
        $className = $this->getClientClassName();
        $cs = $this->getPage()->getClientScript();
        $cs->registerPradoScript('tabpanel');
        $code = "new {$className}({$options});";
        $cs->registerEndScript("prado:{$id}", $code);
        // ensure an item is always active and visible
        $index = $this->getActiveViewIndex();
        if (!$this->getViews()->itemAt($index)->Visible) {
            $index = 0;
        }
        $cs->registerHiddenField($id . '_1', $index);
    }