锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
]]>
1.org.extremecomponents.table.view.html.ToolbarBuilder聽 涓姞鍏ュ涓嬫柟娉曘?br />
聽聽聽 public void pageJumpDroplist(){
聽聽聽聽聽聽聽 Integer total = new Integer(model.getLimit().getTotalRows());
聽聽聽聽聽聽聽聽 Integer from = new Integer(model.getLimit().getRowStart() + 1);
聽聽聽聽聽聽聽聽 Integer to = new Integer(model.getLimit().getRowEnd());
聽聽聽聽聽聽聽聽 Integer current = new Integer(model.getLimit().getCurrentRowsDisplayed());
聽聽聽聽聽聽聽聽 Integer totalPage = (Integer)total/current;
聽聽聽聽聽聽聽聽 if(total%current!=0)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 totalPage=totalPage+1;
聽聽聽聽聽聽聽 int currentPage = model.getLimit().getPage();
聽聽聽聽聽聽聽 html.select().name(model.getTableHandler().prefixWithTableId() + TableConstants.DROWDOWNLIST_PAGE);
聽聽聽聽聽聽聽 StringBuffer onchange = new StringBuffer();
聽聽聽聽聽聽聽 onchange.append(new TableActions(model).getPageJumpAction());
聽聽聽聽聽聽聽 html.onchange(onchange.toString());
聽聽聽聽聽聽聽 html.close();
聽聽聽聽聽聽聽 html.newline();
聽聽聽聽聽聽聽 html.tabs(4);
聽聽聽聽聽聽聽 for(int i=1;i<=totalPage;i++){
聽聽聽聽聽聽聽聽聽聽聽 html.option().value("" + i);
聽聽聽聽聽聽聽聽聽聽聽 if (currentPage == i) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 html.selected();
聽聽聽聽聽聽聽聽聽聽聽 }聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽 html.close();
聽聽聽聽聽聽聽聽聽聽聽 html.append(String.valueOf(i));
聽聽聽聽聽聽聽聽聽聽聽 html.optionEnd();
聽聽聽聽聽聽聽 }
聽聽聽 }
2.org.extremecomponents.table.view.html.TableActions 涓姞鍏?br />
聽聽聽 public String getPageJumpAction(){
聽聽聽聽聽聽聽 StringBuffer action = new StringBuffer("javascript:");
聽聽聽聽聽聽聽 action.append(getClearedExportTableIdParameters());
聽聽聽聽聽聽聽 action.append(getPageJumpFormParameter(TableConstants.PAGE));
聽聽聽聽聽聽聽 action.append(getOnInvokeAction());
聽聽聽聽聽聽聽 return action.toString();
聽聽聽 }
聽聽聽 protected String getPageJumpFormParameter(String name) {
聽聽聽聽聽聽聽 StringBuffer result = new StringBuffer();
聽聽聽聽聽聽聽 String form = BuilderUtils.getForm(model);
聽聽聽聽聽聽聽 String selectedOption = "this.options[this.selectedIndex].value";
聽聽聽聽聽聽聽 result.append("document.forms.").append(form).append(".");
聽聽聽聽聽聽聽 result.append(model.getTableHandler().prefixWithTableId()).append(name);
聽聽聽聽聽聽聽 result.append(".value=").append(selectedOption).append(";");
聽聽聽聽聽聽聽 return result.toString();
聽聽聽 }
3.org.extremecomponents.table.view.DefaultToolbar 涓綘鎯寵鏀劇疆欏甸潰璺寵漿涓嬫媺妗嗙殑鍦版柟鍔犲叆濡備笅浠g爜
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.pageJumpDroplist();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
鎴戝皢鎴戝姞鐨勫湴鏂硅創鏁翠釜鏂規硶璐村嚭鏉ワ紙綰㈣壊鏄湁淇敼鐨勫湴鏂癸級
聽聽聽 protected void columnRight(HtmlBuilder html, TableModel model) {
聽聽聽聽聽聽聽 boolean showPagination = BuilderUtils.showPagination(model);
聽聽聽聽聽聽聽 boolean showExports = BuilderUtils.showExports(model);
聽聽聽聽聽聽聽 ToolbarBuilder toolbarBuilder = new ToolbarBuilder(html, model);
聽聽聽聽聽聽聽 html.td(2).align("right").close();
聽聽聽聽聽聽聽 html.table(2).border("0").cellPadding("0").cellSpacing("1").styleClass(BuilderConstants.TOOLBAR_CSS).close();
聽聽聽聽聽聽聽 html.tr(3).close();
聽聽聽聽聽聽聽 if (showPagination) {
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.firstPageItemAsImage();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.prevPageItemAsImage();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.nextPageItemAsImage();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.lastPageItemAsImage();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.separator();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.pageJumpDroplist();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.separator();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 html.td(4).style("width:20px").close();
聽聽聽聽聽聽聽聽聽聽聽 html.newline();
聽聽聽聽聽聽聽聽聽聽聽 html.tabs(4);
聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.rowsDisplayedDroplist();
聽聽聽聽聽聽聽聽聽聽聽 html.img();
聽聽聽聽聽聽聽聽聽聽聽 html.src(BuilderUtils.getImage(model, BuilderConstants.TOOLBAR_ROWS_DISPLAYED_IMAGE));
聽聽聽聽聽聽聽聽聽聽聽 html.style("border:0");
聽聽聽聽聽聽聽聽聽聽聽 html.alt("Rows Displayed");
聽聽聽聽聽聽聽聽聽聽聽 html.xclose();
聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 if (showExports) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.separator();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 }
聽聽聽聽聽聽聽 }
聽聽聽聽聽聽聽 if (showExports) {
聽聽聽聽聽聽聽聽聽聽聽 Iterator iterator = model.getExportHandler().getExports().iterator();
聽聽聽聽聽聽聽聽聽聽聽 for (Iterator iter = iterator; iter.hasNext();) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 html.td(4).close();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 Export export = (Export) iter.next();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 toolbarBuilder.exportItemAsImage(export);
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽聽聽聽聽聽聽聽聽 }
聽聽聽聽聽聽聽 }
聽聽聽聽聽聽聽 html.trEnd(3);
聽聽聽聽聽聽聽 html.tableEnd(2);
聽聽聽聽聽聽聽 html.newline();
聽聽聽聽聽聽聽 html.tabs(2);
聽聽聽聽聽聽聽 html.tdEnd();
聽聽聽 }
4.org.extremecomponents.table.core.TableConstants涓姞鍏ヤ竴琛?br />
public final static String DROWDOWNLIST_PAGE= "dp";
5.緙栬瘧鎵撳寘錛宱k錛屾悶瀹氫簡銆備笅鍛ㄦ垜浼氭妸鎴戠殑jar浼犱笂鏉ャ?br />
灝辮繖鏍鳳紝涓嶆槸寰堥毦錛孍xtremeTable鏄釜涓嶉敊鐨勪笢涓滐紝甯屾湜澶у涓璧鋒潵瀹屽杽銆?/p>