Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I would like to be able to set an anchor in the portal url. This relates to JS2-587 and I have done some quick fix (see below) but this has side effects (when param appear in url it creates something like: http://localhost/jetspeed/....#anc?param=val and the application does not work) and I think it needs a better approach (navigationalstate ??). I think somewhere the url need to check itself and move anchor at the end of the url. Any thoughts?
===================================================================
— components/portal/src/java/org/apache/jetspeed/container/url/impl/JetspeedPortletURL.java (revision 449944)
+++ components/portal/src/java/org/apache/jetspeed/container/url/impl/JetspeedPortletURL.java (working copy)
@@ -30,13 +30,17 @@
*/
public class JetspeedPortletURL extends PortletURLImpl
{
+ private String portletAnchor = null;
public JetspeedPortletURL(PortletWindow portletWindow, HttpServletRequest servletRequest, HttpServletResponse servletResponse, boolean isAction)
- {
+ { super(portletWindow, servletRequest, servletResponse, isAction); + // for better accessibility when an action is submitted the portal points to portlet id that submitted the action + if(isAction) + this.portletAnchor = "#" + portletWindow.getPortletEntity().getId(); }
public String toString()
- {
- return servletResponse.encodeURL(super.toString());
+ { + return servletResponse.encodeURL(super.toString()) + this.portletAnchor; }}