[ 
http://issues.apache.org/jira/browse/PLUTO-251?page=comments#action_12431125 ] 
            
Charles Severance commented on PLUTO-251:
-----------------------------------------

Here is my patch:

charles-severances-computer:~/dev/pluto-1.1/pluto-trunk csev$ svn diff
Index: 
pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java
===================================================================
--- 
pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java
 (revision 437495)
+++ 
pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java
 (working copy)
@@ -82,7 +82,19 @@
             }
             pageId = defaultPageId;
         }
-        return (PageConfig) pages.get(pageId);
+
+       // TODO: Make sure this is needed.  
+
+        // Sometimes pages come with a prefix of a slash - if the page is not
+       // found, and the first character of the pageId is a slash we attempt
+       // to look up the page without the slash.
+
+        PageConfig retval = (PageConfig) pages.get(pageId);
+
+        if ( retval == null && pageId.startsWith("/") && pageId.length() > 2 ) 
{
+                retval = (PageConfig) pages.get(pageId.substring(1));
+        }
+        return retval;
     }
 
     public void addPage(PageConfig config) {



> Pluto fails when navigating between pages using the drop-downs
> --------------------------------------------------------------
>
>                 Key: PLUTO-251
>                 URL: http://issues.apache.org/jira/browse/PLUTO-251
>             Project: Pluto
>          Issue Type: Bug
>          Components: portal driver
>    Affects Versions: 1.1.0-beta1
>         Environment: This is in trunk - but there is no way to indicate that.
>            Reporter: Charles Severance
>
> This workedsome time ago - so I am thinking something recent happenned when I 
> did an svn update.  It appears to be introduced by PLUTO-243.
> The trunk has a bug where PageId's end up with a prefix of a "/" and so the 
> configuration can never find find pages - and there is a NPE when looking a 
> page up.
> To reproduce - simply bring up pluto, log in as tomcat, and navigate to a 
> page other than the default using the dropdown.

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

        

Reply via email to