protected function getInlineJavaScript()
    {
        $javascript = sprintf(
            "var %s_obj = new SwatCheckboxEntryList('%s');",
            $this->id,
            $this->id
        );

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

        return $javascript;
    }