portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evangelos Vlachogiannis (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Created: (JS2-616) Add anchor in portal URL
Date Tue, 28 Nov 2006 10:22:21 GMT
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


Mime
View raw message