return checkBox;
HtmlHiddenField hidden = new HtmlHiddenField(prefix + HIDDEN_NAME, ""); HtmlCheckBox checkBox = (HtmlCheckBox) layout.createComponent(object, type);  checkBox.setOnClick("this.form." + prefix + HIDDEN_NAME + ".value='true';this.form.submit();"); checkBox.setOnDblClick("this.form." + prefix + HIDDEN_NAME + ".value='true';this.form.submit();"); checkBox.setController(new PostBackController(hidden, getDestination()));  container.addChild(hidden); container.addChild(checkBox);  return container;
    protected Layout getLayout(Object object, Class type) {        final Layout layout = super.getLayout(object, type);        return new Layout() {            @Override            public HtmlComponent createComponent(Object object, Class type) {                HtmlCheckBox checkBox = (HtmlCheckBox) layout.createComponent(object, type);                checkBox.setController(new PostBackController(getDestination()));                checkBox.setOnClick("this.form.submit();");                checkBox.setOnDblClick("this.form.submit();");                return checkBox;            }        };    }