Index: Pagination.java =================================================================== RCS file: /opt/cvsaf/cvsroot/DisplayTagLibrary/main/src/org/displaytag/pagination/Pagination.java,v retrieving revision 1.1 diff -u -r1.1 Pagination.java --- Pagination.java 18 Oct 2006 07:51:29 -0000 1.1 +++ Pagination.java 18 Oct 2006 08:05:04 -0000 @@ -21,6 +21,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.displaytag.util.Href; +import org.displaytag.util.HtmlAttributeMap; // Added by g.agnelli 19-set-2006 - End /** @@ -223,6 +224,8 @@ { StringBuffer buffer = new StringBuffer(100); + StringBuffer formPost = new StringBuffer(200); // Added by g.agnelli 19-set-2006 + // numbered page list Iterator pageIterator = this.pages.iterator(); @@ -236,6 +239,40 @@ String urlString = ((Href) this.href.clone()).addParameter(this.pageParam, pageNumber).toString(); +// Added by g.agnelli 19-set-2006 - Start + if ((((Href) this.href.clone()).addParameter(this.pageParam, + pageNumber)).toString().length() > 2000) { + Href postHref = ((Href) this.href.clone()).addParameter( + this.pageParam, pageNumber); + Object mapKey[] = postHref.getParameterMap().keySet().toArray(); + + String uid = "GoToPage" + pageNumber; + + formPost.append("
"); + Href postExportHerf = (Href) postHref.clone(); + postExportHerf.setFullUrl("javascript:form" + uid + + ".submit();"); + postExportHerf.setParameterMap(new HtmlAttributeMap()); + urlString = postExportHerf.toString(); + } + // Added by g.agnelli 19-set-2006 - End + // needed for MessageFormat : page number/url Object[] pageObjects = {pageNumber, urlString}; @@ -276,6 +313,9 @@ this.isLast() ? this.currentPage : this.lastPage}; // this.lastPage is null if the last page is displayed // return the full banner + + fullBanner += formPost.toString();// Added by g.agnelli 19-set-2006 + return MessageFormat.format(fullBanner, pageObjects); }