Thanks, your sample helped a lot to resolve the issue. Not sure why it was behaving like it but I cleaned up lot of code I had e.g. to manage sessionState etc and it came up just fine.
-----Original Message----- From: Gunna Satria Hijrah Kusumah [mailto:[EMAIL PROTECTED] Sent: Monday, November 14, 2005 5:43 PM To: Tapestry users Subject: Re: contrib:Table type 3 implementation question Hi, Maybe you can give me your code so i can guess what wrong. But before that, maybe you want to check out this simple example. in Java file, private IBasicTableModel source; private DetailObject rowObject; public DetailObject getRowObject() { return rowObject; } public void setRowObject(DetailObject rowObject) { this.rowObject = rowObject; } public List query(int first, int pageSize){ System.out.println("first = "+first+", pageSize = "+pageSize); List list = new ArrayList(); for(int i=0;i<getDummyList().size();i++){ if(i>=first && i<(first+pageSize)){ list.add(getDummyList().get(i)); } } return list; } public List getDummyList(){ List dummyList = new ArrayList(); dummyList.add(new DetailObject("1","one")); dummyList.add(new DetailObject("2","two")); dummyList.add(new DetailObject("3","three")); dummyList.add(new DetailObject("4","four")); dummyList.add(new DetailObject("5","five")); dummyList.add(new DetailObject("6","six")); dummyList.add(new DetailObject("7","seven")); dummyList.add(new DetailObject("8","eight")); dummyList.add(new DetailObject("9","nine")); dummyList.add(new DetailObject("10","ten")); return dummyList; } public IBasicTableModel getSource() { if(null==source){ source = new IBasicTableModel(){ public int getRowCount() { return Home.this.getDummyList().size();//Home is the class name } public Iterator getCurrentPageRows(int nFirst, int nPageSize, ITableColumn objSortColumn, boolean bSortOrder) { return query(nFirst, nPageSize).iterator(); } }; } return source; } in .page file <component id="table" type="contrib:Table"> <binding name="row" expression="rowObject"/> <binding name="columns" expression="'value:Value:value, label:Label:label'"/> <binding name="source" expression="source"/> <binding name="pageSize" expression="3"/> </component> regards, Gunna --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
