Index: D:/java_files/eclipse/workspace/jetspeed-2/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java =================================================================== --- D:/java_files/eclipse/workspace/jetspeed-2/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java (revision 485325) +++ D:/java_files/eclipse/workspace/jetspeed-2/components/portal/src/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java (working copy) @@ -40,10 +40,10 @@ PortalURL portalURL = rc.getPortalURL(); Boolean isAjaxRequest = (Boolean)rc.getAttribute(DecorationValve.IS_AJAX_DECORATION_REQUEST); - String actionURL = (isAjaxRequest == null) + String actionURL = rc.getResponse().encodeURL( (isAjaxRequest == null) ? portalURL.createPortletURL(pw, template.getCustomMode(), template.getCustomState(), portalURL.isSecure()).toString() - : portalURL.createNavigationalEncoding(pw, template.getCustomMode(), template.getCustomState()); + : portalURL.createNavigationalEncoding(pw, template.getCustomMode(), template.getCustomState()) ); String linkURL = decoration.getResource("images/" + actionName + ".gif"); Index: D:/java_files/eclipse/workspace/jetspeed-2/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java =================================================================== --- D:/java_files/eclipse/workspace/jetspeed-2/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java (revision 485325) +++ D:/java_files/eclipse/workspace/jetspeed-2/components/portal/src/java/org/apache/jetspeed/decoration/DecorationValve.java (working copy) @@ -324,9 +324,9 @@ { // switch back to VIEW mode and NORMAL state. PortalURL portalURL = requestContext.getPortalURL(); - String action = (isAjaxRequest) + String action = requestContext.getResponse().encodeURL( (isAjaxRequest) ? portalURL.createNavigationalEncoding(window, PortletMode.VIEW, WindowState.NORMAL) - : portalURL.createPortletURL(window, PortletMode.VIEW, WindowState.NORMAL, portalURL.isSecure()).toString(); + : portalURL.createPortletURL(window, PortletMode.VIEW, WindowState.NORMAL, portalURL.isSecure()).toString() ); String actionName = PortletMode.VIEW.toString(); pageModes.add(new DecoratorAction(actionName, requestContext.getLocale(), decoration.getResource("images/" + actionName + ".gif"),action,DecoratorActionTemplate.ACTION_TYPE_MODE)); } @@ -339,9 +339,9 @@ parameters.put("pageMode",paramValues); // Use an ActionURL to set the oposite pageMode and always set VIEW mode and state NORMAL - String action = (isAjaxRequest) + String action = requestContext.getResponse().encodeURL( (isAjaxRequest) ? portalURL.createNavigationalEncoding(window, parameters, PortletMode.VIEW, WindowState.NORMAL, true) - : portalURL.createPortletURL(window, parameters, PortletMode.VIEW, WindowState.NORMAL, true, portalURL.isSecure()).toString(); + : portalURL.createPortletURL(window, parameters, PortletMode.VIEW, WindowState.NORMAL, true, portalURL.isSecure()).toString() ); pageModes.add(new DecoratorAction(targetMode, requestContext.getLocale(), decoration.getResource("images/" + targetMode + ".gif"), action,DecoratorActionTemplate.ACTION_TYPE_MODE)); if (content.supportsPortletMode(PortletMode.HELP)) @@ -350,16 +350,16 @@ { // force it back to VIEW mode first with an ActionURL, as well as setting HELP mode and MAXIMIZED state paramValues[0] = PortletMode.VIEW.toString(); - action = (isAjaxRequest) + action = requestContext.getResponse().encodeURL( (isAjaxRequest) ? portalURL.createNavigationalEncoding(window, parameters, PortletMode.HELP, WindowState.MAXIMIZED, true) - : portalURL.createPortletURL(window, parameters, PortletMode.HELP, WindowState.MAXIMIZED, true, portalURL.isSecure()).toString(); + : portalURL.createPortletURL(window, parameters, PortletMode.HELP, WindowState.MAXIMIZED, true, portalURL.isSecure()).toString() ); } else { // switch to mode HELP and state MAXIMIZED - action = (isAjaxRequest) + action = requestContext.getResponse().encodeURL( (isAjaxRequest) ? portalURL.createNavigationalEncoding(window, PortletMode.HELP, WindowState.MAXIMIZED) - : portalURL.createPortletURL(window,PortletMode.HELP, WindowState.MAXIMIZED, portalURL.isSecure()).toString(); + : portalURL.createPortletURL(window,PortletMode.HELP, WindowState.MAXIMIZED, portalURL.isSecure()).toString() ); } String actionName = PortletMode.HELP.toString(); pageModes.add(new DecoratorAction(actionName, requestContext.getLocale(), decoration.getResource("images/" + actionName + ".gif"), action,DecoratorActionTemplate.ACTION_TYPE_MODE));