Nope, added in the code. This is my code 

 public QuickSearchFilterPanel(String id) {
        super(id);
        Form form = new Form("filterform");

        List<Class&lt;?>> classes = resultItemHandlerPool.getTypes();
        types = new ArrayList<IModel&lt;Class&lt;?>>>();

        if (classes != null) {
            for (final Class<?> clazz : classes) {
                IModel<Class&lt;?>> model = new IModel<Class&lt;?>>() {
                    @Override
                    public Class<?> getObject() {
                        return clazz;
                    }

                    @Override
                    public void setObject(Class<?> object) {

                    }

                    @Override
                    public void detach() {

                    }
                };

                types.add(model);
            }
        }

        group = new CheckGroup<IModel&lt;Class&lt;?>>>("checkboxgroup", new
PropertyModel<Collection&lt;IModel&lt;Class&lt;?>>>>(this, "types"));
        group.add(new CheckGroupSelector("checkall"));

        ListView typesListview = new
ListView<IModel&lt;Class&lt;?>>>("typesList", new
PropertyModel<List&lt;IModel&lt;Class&lt;?>>>>(this, "types")) {
            @Override
            protected void populateItem(final
ListItem<IModel&lt;Class&lt;?>>> item) {
                final IModel<Class&lt;?>> classModel =
item.getModelObject();
                Check checkbox = new Check<Class&lt;?>>("check",
classModel);
                Label className = new Label("className",
classModel.getObject().getSimpleName());
                item.add(checkbox, className);
            }
        };
        typesListview.setReuseItems(true);
        group.add(typesListview);
        form.add(group);

        Button saveButton = new Button("saveButton") {
            @Override
            public void onSubmit() {
                super.onSubmit();
            }
        };
        form.add(saveButton);
        add(form);
    }

    public List<Class&lt;?>> getSearchableTypes() {
        List<Class&lt;?>> searchableTypes = new ArrayList<Class&lt;?>>();

        for (IModel<Class&lt;?>> type : types) {
            searchableTypes.add(type.getObject());
        }
        return searchableTypes;

    }



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Saving-checked-choices-from-CheckGroup-tp4658408p4658411.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to