sdfsdf

 private String generateTable(Pagination pagination) throws JspException {
  StringBuffer results = new StringBuffer();
       
  //the "currentpage/pages" align left, html start.
  results.append("<table width=\"100%\"><tr><td align=\"right\">");
  results.append(RequestUtils.message(super.pageContext, bundle, localeKey,"label.tag.page.total") + "&nbsp;"+pagination.getCount() + "&nbsp;&nbsp;&nbsp;");
  results.append(RequestUtils.message(super.pageContext, bundle, localeKey,"label.tag.page") + "&nbsp;"+pagination.getCurrent() + "/");
  results.append(pagination.getPages() +"&nbsp;");
       
  if (pagination.firstEnable()) {
   results.append("<a href=\"javascript:firstPage_"+property+"(this.document."+name+");\" ");
   if (target != null) {
    results.append(" target=\""+target+"\"");
   }
   results.append(prepareStyles());
   results.append(prepareEventHandlers());
   results.append(">");
   results.append(firstValue+"</a>");
  }
  else {
   results.append(firstValue);
  }

  results.append("&nbsp;&nbsp;\n");

  //前一页
  if (pagination.previoEnable()) {
   results.append("<a href=\"javascript:prevPage_"+property+"(this.document."+name+");\" ");
   if (target != null) {
    results.append(" target=\""+target+"\"");
   }
   results.append(prepareStyles());
   results.append(prepareEventHandlers());
   results.append(">");
   results.append(previoValue+"</a>");
  }
  else {
   results.append(previoValue);
  }

  results.append("&nbsp;&nbsp;\n");

  //下一页
  if (pagination.nextEnable()) {
   results.append("<a href=\"javascript:nextPage_"+property+"(this.document."+name+");\" ");
   if (target != null) {
    results.append(" target=\""+target+"\"");
   }
   results.append(prepareStyles());
   results.append(prepareEventHandlers());
   results.append(">");
   results.append(nextValue+"</a>");
  }
  else {
   results.append(nextValue);
  }

  results.append("&nbsp;&nbsp;\n");

你可能感兴趣的:(JavaScript,html)