Author: doogie
Date: Mon Jun 29 04:10:22 2009 New Revision: 789205 URL: http://svn.apache.org/viewvc?rev=789205&view=rev Log: No longer call RequestHandler.makeLink, instead calling appendOfbizUrl, so that sub-classes have an easier time of it. Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=789205&r1=789204&r2=789205&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Mon Jun 29 04:10:22 2009 @@ -2366,7 +2366,7 @@ writer.append("javascript:ajaxUpdateAreas('").append(createAjaxParamsFromUpdateAreas(updateAreas, prepLinkText + 0 + anchor, context)).append( "')"); } else { linkText = prepLinkText + 0 + anchor; - writer.append(rh.makeLink(this.request, this.response, urlPath + linkText)); + appendOfbizUrl(writer, urlPath + linkText); } writer.append("\">").append(modelForm.getPaginateFirstLabel(context)).append("</a>"); } else { @@ -2384,7 +2384,7 @@ writer.append("javascript:ajaxUpdateAreas('").append(createAjaxParamsFromUpdateAreas(updateAreas, prepLinkText + (viewIndex - 1) + anchor, context)).append("')"); } else { linkText = prepLinkText + (viewIndex - 1) + anchor; - writer.append(rh.makeLink(this.request, this.response, urlPath + linkText)); + appendOfbizUrl(writer, urlPath + linkText); } writer.append("\">").append(modelForm.getPaginatePreviousLabel(context)).append("</a>"); } else { @@ -2404,7 +2404,9 @@ if (linkText.startsWith("/")) { linkText = linkText.substring(1); } - writer.append("location.href = '").append(rh.makeLink(this.request, this.response, urlPath + linkText)).append("' + this.value;"); + writer.append("location.href = '"); + appendOfbizUrl(writer, urlPath + linkText); + writer.append("' + this.value;"); } writer.append("\">"); // actual value @@ -2440,7 +2442,7 @@ writer.append("javascript:ajaxUpdateAreas('").append(createAjaxParamsFromUpdateAreas(updateAreas, prepLinkText + (viewIndex + 1) + anchor, context)).append("')"); } else { linkText = prepLinkText + (viewIndex + 1) + anchor; - writer.append(rh.makeLink(this.request, this.response, urlPath + linkText)); + appendOfbizUrl(writer, urlPath + linkText); } writer.append("\">").append(modelForm.getPaginateNextLabel(context)).append("</a>"); } else { @@ -2458,7 +2460,7 @@ writer.append("javascript:ajaxUpdateAreas('").append(createAjaxParamsFromUpdateAreas(updateAreas, prepLinkText + (listSize / viewSize) + anchor, context)).append("')"); } else { linkText = prepLinkText + (listSize / viewSize) + anchor; - writer.append(rh.makeLink(this.request, this.response, urlPath + linkText)); + appendOfbizUrl(writer, urlPath + linkText); } writer.append("\">").append(modelForm.getPaginateLastLabel(context)).append("</a>"); } else { @@ -2548,7 +2550,7 @@ if (ajaxEnabled) { writer.append("javascript:ajaxUpdateAreas('").append(createAjaxParamsFromUpdateAreas(updateAreas, prepLinkText, context)).append("')"); } else { - writer.append(rh.makeLink(this.request, this.response, urlPath + prepLinkText)); + appendOfbizUrl(writer, urlPath + prepLinkText); } writer.append("\">").append(titleText).append("</a>"); } @@ -2901,7 +2903,11 @@ ajaxParams += extraParams; } ajaxUrl.append(updateArea.getAreaId()).append(","); - ajaxUrl.append(this.rh.makeLink(this.request, this.response, UtilHttp.removeQueryStringFromTarget(targetUrl))); + try { + appendOfbizUrl(ajaxUrl, UtilHttp.removeQueryStringFromTarget(targetUrl)); + } catch (IOException e) { + throw (InternalError) new InternalError(e.getMessage()).initCause(e); + } ajaxUrl.append(",").append(ajaxParams); } return ajaxUrl.toString(); |
Free forum by Nabble | Edit this page |