public function getInlineJavaScript()
    {
        $view = $this->getFirstAncestor('SwatView');
        if ($view !== null) {
            $javascript = sprintf(
                "var %s = new SwatRadioButtonCellRenderer('%s', %s);",
                $this->id,
                $this->id,
                $view->id
            );
        } else {
            $javascript = '';
        }

        return $javascript;
    }