-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi everyone, I'm a beginner using ZK, but my problem is when a click on listbox and then
bandbox closes.. an error is thrown : Italic textThe paging component cannot be removed manually. It is removed automatically when changing the mold
and how can i limit the number of rows ? by default is 20 rows i'd like i was 10 rows...
Here is the code:
zul file
java file
public void onOpen$bbxDistrito(Event evt) throws SQLException, ConecctionException {
this.cargarDistrito();
}
public void onSelect$lbxDistrito(Event evt){
Listitem li = lbxDistrito.getSelectedItem();
tDist=(TOdistrito)li.getValue();
bbxDistrito.setValue(tDist.getDenom());
bbxDistrito.closeDropdown();
}
private void cargarDistrito() throws SQLException, ConecctionException{
List<TOdistrito> lista=cDist.all();
lbxDistrito.getItems().clear();
Iterator<TOdistrito> it = lista.iterator();
while(it.hasNext()){
TOdistrito x=it.next();
Listitem item=new Listitem();
item.setValue(x);
//Listcell cell=new Listcell(x.getIddistrito().toString());
//cell.setParent(item);
Listcell cell=new Listcell(x.getDepartamento());
cell.setParent(item);
cell=new Listcell(x.getProvincia());
cell.setParent(item);
cell=new Listcell(x.getDenom());
cell.setParent(item);
item.setParent(lbxDistrito);
}
}
bbxDistrito.close() instead of bbxDistrito.closeDropdown();
Hi,
Which ZK version you are using?
I test your zul file, no error for me.
Please use the latest version.
Thanks,
to GuzZpaWn :
i have find the problem, you and i do the same thing is clear the data,when the listbox is add to bandbox. But i see the ZK code, we do not need to clear the mold "paging", so when we use the listbox.getChildren().clear();,it will throw the error. so we have to find another method to clear the data.
so your code, must to edit like this: cancel the code lbxDistrito.getItems().clear(); and find another way to clear the data.
hava fun.
Yann.
Asked: 2009-11-30 22:38:06 +0800
Seen: 997 times
Last updated: Dec 05 '10