You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Evangelos Vlachogiannis (JIRA)" <je...@portals.apache.org> on 2006/11/28 11:22:21 UTC

[jira] Created: (JS2-616) Add anchor in portal URL

Add anchor in portal URL 
-------------------------

                 Key: JS2-616
                 URL: http://issues.apache.org/jira/browse/JS2-616
             Project: Jetspeed 2
          Issue Type: Improvement
          Components: Components Core
            Reporter: Evangelos Vlachogiannis
            Priority: Minor


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;
     }
 }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org