Anonymous avatar Anonymous committed faaddd4

Issue number: ww-1048

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@1868 573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (2)

src/java/com/opensymphony/webwork/components/RemoteCallUIBean.java

     protected String errorText;
     protected String showErrorTransportText;
     protected String afterLoading;
+    
+    // ww-1048 build url using UrlHelper for href attribute if this is true.
+    protected boolean buildUrlForHrefAttribute = true;
 
     public RemoteCallUIBean(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) {
         super(stack, request, response);
             String actionUrl = PortletContext.getContext().getActionURL();
 
             if (!TextUtils.stringSet(actionUrl)) {
-                // This is needed for portal and DOJO ajax stuff!
-                addParameter("href", UrlHelper.buildUrl(hrefValue, request, response, null));
+            	if (buildUrlForHrefAttribute) {
+            		// This is needed for portal and DOJO ajax stuff!
+            		addParameter("href", UrlHelper.buildUrl(hrefValue, request, response, null));
+            	}
+            	else {
+            		addParameter("href", hrefValue);
+            	}
             } else {
 
                 String actionExtension = (String) Configuration.get("webwork.action.extension");
                         sb.append(actionUrl).append("?wwLink=").append(hrefValue);
                     }
                 }
-
+                
                 addParameter("href", sb.toString());
             }
 
     public void setAfterLoading(String afterLoading) {
         this.afterLoading = afterLoading;
     }
+    
+    public void setBuildUrlForHrefAttribute(boolean buildUrlForHrefAttribute) {
+    	this.buildUrlForHrefAttribute = buildUrlForHrefAttribute;
+    }
 }

src/java/com/opensymphony/webwork/views/jsp/ui/AnchorTag.java

         super.populateParams();
 
         Anchor link = (Anchor) component;
+        
+        // ww-1048, anchor tag *SHOULD NOT* build url using UrlHelper, this conflicts
+        // with what the URL tag does.
+        link.setBuildUrlForHrefAttribute(false);
+        
         link.setHref(href);
         link.setErrorText(errorText);
         link.setShowErrorTransportText(showErrorTransportText);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.