JBoss Portal SVN: r12422 - branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-01-01 15:48:31 -0500 (Thu, 01 Jan 2009)
New Revision: 12422
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
Log:
JBPORTAL-2151 - WYSIWYG not working in preview with files with no content
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-01-01 20:07:30 UTC (rev 12421)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-01-01 20:48:31 UTC (rev 12422)
@@ -94,9 +94,12 @@
<!-- Preview of Content being approved -->
<%
String pendingPreviewContent = (String)request.getAttribute("pendingPreviewContent");
- String contentBeingPreviewed = "-1";
+ String contentBeingPreviewed = "-1";
+ if(pendingPreviewContent == null)
+ {
+ pendingPreviewContent = "";
+ }
%>
-<%if(pendingPreviewContent != null && pendingPreviewContent.trim().length() >0){%>
<%
String pid = request.getParameter("pid");
String path = request.getParameter("path");
@@ -177,7 +180,6 @@
</form>
</div>
<br/></br>
-<%}%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
17 years, 4 months
JBoss Portal SVN: r12421 - in branches/JBoss_Portal_Branch_2_6/core-cms/src: resources/portal-cms-war/WEB-INF/classes and 1 other directory.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-01-01 15:07:30 -0500 (Thu, 01 Jan 2009)
New Revision: 12421
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
Log:
JBPORTAL-2158 - NullPointer exception when accessing non existing directory in CMS
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2009-01-01 20:07:01 UTC (rev 12420)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2009-01-01 20:07:30 UTC (rev 12421)
@@ -202,7 +202,7 @@
{
throw new PortletException(e);
}
- }
+ }
}
/**
@@ -247,11 +247,31 @@
sPath = "/";
}
+
JCRCMS.enableUISecurityFilter();
Command listCMD = CMSService.getCommandFactory().createFolderGetListCommand(sPath);
Folder mainFolder = (Folder)CMSService.execute(listCMD);
- List folders = mainFolder.getFolders();
- List files = mainFolder.getFiles();
+
+ List folders = new ArrayList();
+ List files = new ArrayList();
+
+ if(mainFolder != null)
+ {
+ folders = mainFolder.getFolders();
+ files = mainFolder.getFiles();
+ }
+ else
+ {
+ Object messages = rReq.getPortletSession().getAttribute("messages");
+ if(messages == null)
+ {
+ messages = new ArrayList();
+ rReq.getPortletSession().setAttribute("messages", messages);
+ }
+
+ ((List)messages).add(this.resources.getObject("CMS_MISSING_RESOURCE"));
+ }
+
JCRCMS.disableUISecurityFilter();
rRes.setContentType("text/html");
@@ -276,6 +296,7 @@
{
Object messages = rReq.getPortletSession().getAttribute("messages");
rReq.getPortletSession().removeAttribute("messages");
+
rReq.setAttribute("messages", messages);
}
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2009-01-01 20:07:01 UTC (rev 12420)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2009-01-01 20:07:30 UTC (rev 12421)
@@ -150,5 +150,6 @@
CMS_DATE_PATTERN=MM/dd/yy HH:mm
INVALID_ARCHIVE_MESSAGE=The archive being uploaded is not a valid archive file
+CMS_MISSING_RESOURCE=Requested CMS Resource could not be Found
17 years, 4 months
JBoss Portal SVN: r12420 - in branches/JBoss_Portal_Branch_2_7/core-cms/src: resources/portal-cms-war/WEB-INF/classes and 1 other directory.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-01-01 15:07:01 -0500 (Thu, 01 Jan 2009)
New Revision: 12420
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
Log:
JBPORTAL-2158 - NullPointer exception when accessing non existing directory in CMS
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2008-12-31 21:48:00 UTC (rev 12419)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2009-01-01 20:07:01 UTC (rev 12420)
@@ -202,7 +202,7 @@
{
throw new PortletException(e);
}
- }
+ }
}
/**
@@ -247,11 +247,31 @@
sPath = "/";
}
+
JCRCMS.enableUISecurityFilter();
Command listCMD = CMSService.getCommandFactory().createFolderGetListCommand(sPath);
Folder mainFolder = (Folder)CMSService.execute(listCMD);
- List folders = mainFolder.getFolders();
- List files = mainFolder.getFiles();
+
+ List folders = new ArrayList();
+ List files = new ArrayList();
+
+ if(mainFolder != null)
+ {
+ folders = mainFolder.getFolders();
+ files = mainFolder.getFiles();
+ }
+ else
+ {
+ Object messages = rReq.getPortletSession().getAttribute("messages");
+ if(messages == null)
+ {
+ messages = new ArrayList();
+ rReq.getPortletSession().setAttribute("messages", messages);
+ }
+
+ ((List)messages).add(this.resources.getObject("CMS_MISSING_RESOURCE"));
+ }
+
JCRCMS.disableUISecurityFilter();
rRes.setContentType("text/html");
@@ -276,6 +296,7 @@
{
Object messages = rReq.getPortletSession().getAttribute("messages");
rReq.getPortletSession().removeAttribute("messages");
+
rReq.setAttribute("messages", messages);
}
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-12-31 21:48:00 UTC (rev 12419)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2009-01-01 20:07:01 UTC (rev 12420)
@@ -150,5 +150,6 @@
CMS_DATE_PATTERN=MM/dd/yy HH:mm
INVALID_ARCHIVE_MESSAGE=The archive being uploaded is not a valid archive file
+CMS_MISSING_RESOURCE=Requested CMS Resource could not be Found
17 years, 4 months