wicket - Pagination is not working in ehour 1.2 -
pagination not working in ehour1.2 when click on next page. here link
http://www.ehour.nl/forum/viewtopic.php?f=2&t=40529#p41972
pagination not working in ehour1.2 when click on next page. here link http://www.ehour.nl/forum/viewtopic.php?f=2&t=40529#p41972
here java code:
public class treereportdatapanel extends panel { private static final long serialversionuid = -6757047600645464803l; private static final attributemodifier css_align_right = attributemodifier.replace("style", "text-align: right;"); private final reportconfig reportconfig; public treereportdatapanel(string id, treereportmodel reportmodel, reportconfig reportconfig, final excelreport excelreport ) { super(id); this.reportconfig = reportconfig; border blueborder = new bluetabroundedborder("blueframe"); add(blueborder); blueborder.setoutputmarkupid(true); if (excelreport != null) { blueborder.add(new excellink("excellink", reportmodel.getreportcriteria()) { @override protected excelreport createreportbuilder() { return excelreport; } }); } else { blueborder.add(htmlutil.getinvisiblelink("excellink")); } blueborder.add(getreportheaderlabel("reportheader", reportmodel.getreportrange(), ehourwebsession.getsession().getehourconfig())); addheadercolumns(blueborder); addreportdata(reportmodel, blueborder); addgrandtotal(reportmodel, blueborder); } @suppresswarnings("unchecked") private void addreportdata(treereportmodel reportmodel, webmarkupcontainer parent) { list<treereportelement> elements = (list<treereportelement>) reportmodel.getreportdata().getreportelements(); dataview<treereportelement> dataview = new treereportdataview("reportdata", new treereportdataprovider(elements)); dataview.setoutputmarkupid(true); dataview.setitemsperpage(20); parent.add(new hoverpagingnavigator("navigator", dataview)); parent.add(dataview); } public class hoverpagingnavigator extends ajaxpagingnavigator { private static final long serialversionuid = 1095553728045877576l; private final ipageable pageable; public hoverpagingnavigator(string id, ipageable pageable) { super(id, pageable); this.pageable = pageable; } @override public boolean isvisible() { return pageable.getpagecount() > 1; } }
my html looks this:
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<div style="width:100%;text-align: right;height:22px"><a wicket:id="excellink" title="export excel"><img src="img/download.png" border="0"/></a></div> <table class="reporttable" cellpadding="0" cellspacing="0"> <thead> <tr> <th wicket:id="columnheaders"></th> </tr> </thead> <tfoot> <tr class="totalrow"> <td wicket:id="cell" valign="top"><b>2,140</b></td> </tr> </tfoot> <tbody> <tr class="datarow" wicket:id="reportdata"> <td wicket:id="cell" valign="top"></td> </tr> </tbody> </table> <span wicket:id="navigator">[dataview navigator]</span> </div> </div> </div> i think blueframe_body generated one, can't set setoutputmarkupid property set true. following error message: caused by: java.lang.illegalargumentexception: cannot update component not have setoutputmarkupid property set true. component: [borderbodycontainer [component id = blueframe_body]]
from stack : cannot update component not have setoutputmarkupid property set true -> component: blueframe_body. hard tell if reason try this:
blueframe_body.setoutputmarkupid(true);
Comments
Post a Comment