PDA

View Full Version : How to click check box items in the CheckBox ListView at runtime



anoops
25 Dec 2011, 8:46 AM
Could anyone please explain how can we click the few check box items at runtime using a bean model.


view = new CheckBoxListView<PermissionProxy>() {
@Override
protected PermissionProxy prepareData(PermissionProxy model) {
String s = model.get("name");
//model.set("name", Format.ellipse(s, 15));
return model;
}
};


view.setStore(permissionStore);
view.setDisplayProperty("name");

view.setWidth(150);
view.setHeight(200);

Tried to check the boxes after rendering this by


List<PermissionProxy> p = data.getPermissions();
Iterator<PermissionProxy> it = p.iterator();
while(it.hasNext()){
PermissionProxy tp = it.next();
PermissionProxy temp = (PermissionProxy) permissionStore.findModel("name", tp.getName().toString());

view.setChecked(temp, true);
}

anoops
26 Dec 2011, 3:14 PM
Asynchronous call was causing the issue. This has been resolved now.