public function getJavascript()
    {
        if (!empty($this->columns)) {
            $this->setJsInitParam('columns', $this->getColumnsForJs());
        }

        $js = 'var '.$this->tableName.' = $("#'.$this->tableName.'").dataTable('."\n"
                .(!empty($this->jsInitParameters) ? PHPToJS::render((object) $this->jsInitParameters) : '')."\n"
            .');'."\n";

        $js .= $this->getJavascriptSearchPart();

        return $js;
    }