protected function getInlineJavaScript()
    {
        $javascript = sprintf(
            'var %s_obj = new %s(%s);',
            $this->id,
            $this->getJavaScriptClassName(),
            SwatString::quoteJavaScriptString($this->id)
        );

        // set check-all controller if it is visible
        $check_all = $this->getCompositeWidget('check_all');
        if ($check_all->visible) {
            $javascript .= sprintf(
                "\n%s_obj.setController(%s_obj);",
                $check_all->id,
                $this->id
            );
        }

        return $javascript;
    }