portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r896725 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
Date Thu, 07 Jan 2010 01:01:35 GMT
Author: taylor
Date: Thu Jan  7 01:01:34 2010
New Revision: 896725

URL: http://svn.apache.org/viewvc?rev=896725&view=rev
Log:
JS2-1084
bug fix: handle cases where toolbar(s) are not defined

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java?rev=896725&r1=896724&r2=896725&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
Thu Jan  7 01:01:34 2010
@@ -263,11 +263,14 @@
             return toolbar;
         ContentPage page = context.getPage();
         ContentFragment cf = page.getFragmentByFragmentId(id);
-        toolbar = new Toolbar(orientation, id, cf);
-        toolbar.setCssClass(cf.getProperty("class"));
-        String state = cf.getProperty("state");
-        if (state != null)
-            toolbar.setClosed(state.equals("closed"));
+        if (cf != null) 
+        {
+            toolbar = new Toolbar(orientation, id, cf);
+            toolbar.setCssClass(cf.getProperty("class"));
+            String state = cf.getProperty("state");
+            if (state != null)
+                toolbar.setClosed(state.equals("closed"));
+        }
         return toolbar;
     }
     



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