0

The paging component cannot be removed manually?

asked 2009-11-30 22:38:06 +0800

GuzZpaWn gravatar image GuzZpaWn
111 2

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



<bandbox id="bbxDistrito" >
<bandpopup>
<vbox>
<hbox>
Buscar
<textbox />
</hbox>
<listbox id="lbxDistrito" width="800px" mold="paging">
<listhead>
<!--listheader label="Id" width="10%"/-->
<listheader label="Departamento" width="20%" />
<listheader label="Provincia" width="30%" />
<listheader label="Distrito" width="50%" />
</listhead>
<listitem>
<listcell id="lclIdDist" />
<listcell id="lclDept" />
<listcell id="lclProv" />
<listcell id="lclDist" />
</listitem>

</listbox>
</vbox>
</bandpopup>
</bandbox>

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);
}
}

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2009-12-01 06:15:07 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2009-12-01 06:16:21 +0800

bbxDistrito.close() instead of bbxDistrito.closeDropdown();

link publish delete flag offensive edit

answered 2009-12-01 09:38:37 +0800

GuzZpaWn gravatar image GuzZpaWn
111 2

thanx terrytornado.. but the error is the same...
here is the error

link publish delete flag offensive edit

answered 2009-12-02 04:35:30 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Hi,

Which ZK version you are using?
I test your zul file, no error for me.

link publish delete flag offensive edit

answered 2009-12-02 10:30:31 +0800

GuzZpaWn gravatar image GuzZpaWn
111 2

im using ZK 3.5.1 with netbeans...

link publish delete flag offensive edit

answered 2009-12-04 04:55:11 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Please use the latest version.

Thanks,

link publish delete flag offensive edit

answered 2010-12-05 19:23:46 +0800

thflove99 gravatar image thflove99
54 1

i'have the same problem. So, i don't think is the version's problem.

link publish delete flag offensive edit

answered 2010-12-05 20:29:14 +0800

thflove99 gravatar image thflove99
54 1

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-11-30 22:38:06 +0800

Seen: 996 times

Last updated: Dec 05 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More