mardi 18 juillet 2017

How to get values from unchecked checkboxes in GWT?

I am developing a GWT app where I use CheckBoxListView. This is a piece of code which I am using to build check boxes:

list = new ArrayList<GwtRole>();

            RpcProxy<ListLoadResult<GwtRole>> roleUserProxy = new RpcProxy<ListLoadResult<GwtRole>>() {

                @Override
                protected void load(Object loadConfig, AsyncCallback<ListLoadResult<GwtRole>> callback) {
                    GWT_ROLE_SERVICE.findAll(currentSession.getSelectedAccount().getId(),
                            callback);
                }
            };

            BaseListLoader<ListLoadResult<GwtRole>> roleLoader = new BaseListLoader<ListLoadResult<GwtRole>>(roleUserProxy);
            roleLoader.load();
            ListStore<GwtRole> roleStore = new ListStore<GwtRole>(roleLoader);


          aa = new CheckBoxListView<GwtRole>(){
               @Override
               protected GwtRole prepareData(GwtRole model) {
                   String name  = model.getName();
                   model.set("name", name);
                   return model;
               };
           };

           aa.setStore(roleStore);

And this is piece of code where I am collecting checked values from check boxes:

list =  aa.getChecked();

But I need values that are NOT checked in check boxes also. Could someone helps me to see how I could do that?




Aucun commentaire:

Enregistrer un commentaire