[portal-commits] JBoss Portal SVN: r9170 - branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Wed Nov 28 11:35:27 EST 2007


Author: sohil.shah at jboss.com
Date: 2007-11-28 11:35:27 -0500 (Wed, 28 Nov 2007)
New Revision: 9170

Modified:
   branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp
Log:
[JBPORTAL-1721] - Improve error handling when the CMS content cannot be found by the content selector

Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp	2007-11-28 16:05:30 UTC (rev 9169)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/editor/main.jsp	2007-11-28 16:35:27 UTC (rev 9170)
@@ -122,19 +122,25 @@
    {
       Content content = (Content)renderRequest.getAttribute("content");
 %>
-<p class="portlet-font">
-   Selected file: <%= uri %><br/>
-   <%
-      if (content.getTitle() != null)
-      {
-         out.println("File title: " + content.getTitle() + "<br />");
-      }
-      if (content.getDescription() != null)
-      {
-         out.println("File description: " + content.getDescription() + "<br />");
-      }
-   %>
-</p>
+	<%if(content != null){%>
+	<p class="portlet-font">
+	   Selected file: <%= uri %><br/>
+	   <%
+	      if (content.getTitle() != null)
+	      {
+	         out.println("File title: " + content.getTitle() + "<br />");
+	      }
+	      if (content.getDescription() != null)
+	      {
+	         out.println("File description: " + content.getDescription() + "<br />");
+	      }
+	   %>
+	</p>
+	<%}else{%>
+	<p class="portlet-font">
+		Content could not be found for the selected file
+	</p>
+	<%}%>
 <%
       }
    }




More information about the portal-commits mailing list