Author: doogie
Date: Mon Jun 29 17:44:11 2009 New Revision: 789395 URL: http://svn.apache.org/viewvc?rev=789395&view=rev Log: No longer call rh.makeLink directly; instead, call appendOfbizUrl, which already existed for this purpose. This allows subclasses to alter the behaviour. 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=789395&r1=789394&r2=789395&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 17:44:11 2009 @@ -2365,7 +2365,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 { @@ -2383,7 +2383,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 { @@ -2403,7 +2403,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 @@ -2439,7 +2441,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 { @@ -2457,7 +2459,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 { @@ -2549,7 +2551,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>"); } @@ -2902,7 +2904,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 |