[jboss-svn-commits] JBoss Portal SVN: r5172 - trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Sep 11 16:42:49 EDT 2006


Author: sohil.shah at jboss.com
Date: 2006-09-11 16:42:47 -0400 (Mon, 11 Sep 2006)
New Revision: 5172

Modified:
   trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
Log:
minor fixed related to (create/edit) of content 

Modified: trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java	2006-09-11 20:17:43 UTC (rev 5171)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java	2006-09-11 20:42:47 UTC (rev 5172)
@@ -249,22 +249,23 @@
             sbUrl.append(rReq.getServerPort());
          }
 
-         throw new PortletException("Julien commented some code as the theme cannot be available from the portlet");
-/*
-         PortalTheme theme = rReq.getTheme();
+         //throw new PortletException("Julien commented some code as the theme cannot be available from the portlet");
+         //julien probably commented this out cause getting theme from the JBossRenderRequest object
+         //is either deprecated or return null...Personally I have experienced in null in portal-2.2.1rc1 (sohil)
+         /*PortalTheme theme = rReq.getTheme();
          List links = theme.getThemeInfo().getLinks();
          ThemeLink cssLink = (ThemeLink)links.get(0);
          //         String sCSSHref = cssLink.getLink().toString();
          //         String sCSSURL = sCSSHref.substring(sCSSHref.indexOf("href='") + 6, sCSSHref.lastIndexOf(".css'") + 4);
          String sCSSURL = cssLink.getAttributeValue("href");
+         rReq.setAttribute("css_url", sbUrl.toString() + sCSSURL);
+         */
 
          rRes.setContentType("text/html");
          rReq.setAttribute("currpath", sPath);
-         rReq.setAttribute("document_base_url", sbUrl.toString() + this.buildURL(rRes, "/"));
-         rReq.setAttribute("css_url", sbUrl.toString() + sCSSURL);
+         rReq.setAttribute("document_base_url", sbUrl.toString() + this.buildURL(rRes, "/"));         
          javax.portlet.PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/create.jsp");
          prd.include(rReq, rRes);
-*/
       }
       else if (CMSAdminConstants.OP_EDIT.equals(op))
       {
@@ -283,19 +284,22 @@
             sbUrl.append(rReq.getServerPort());
          }
 
-         throw new PortletException("Julien commented some code as the theme cannot be available from the portlet");
-/*
+         //throw new PortletException("Julien commented some code as the theme cannot be available from the portlet");
+         //julien probably commented this out cause getting theme from the JBossRenderRequest object
+         //is either deprecated or return null...Personally I have experienced in null in portal-2.2.1rc1 (sohil)
+         /*
          PortalTheme theme = rReq.getTheme();
          List links = theme.getThemeInfo().getLinks();
          ThemeLink cssLink = (ThemeLink)links.get(0);
          //         String sCSSHref = cssLink.getLink().toString();
          //         String sCSSURL = sCSSHref.substring(sCSSHref.indexOf("href='") + 6, sCSSHref.lastIndexOf(".css'") + 4);
          String sCSSURL = cssLink.getAttributeValue("href");
+         rReq.setAttribute("css_url", sbUrl.toString() + sCSSURL);
+         */         
 
          rRes.setContentType("text/html");
          rReq.setAttribute("currpath", sPath);
-         rReq.setAttribute("document_base_url", sbUrl.toString() + this.buildURL(rRes, "/"));
-         rReq.setAttribute("css_url", sbUrl.toString() + sCSSURL);
+         rReq.setAttribute("document_base_url", sbUrl.toString() + this.buildURL(rRes, "/"));         
 
 
          Command getCommand;
@@ -319,7 +323,6 @@
 
          javax.portlet.PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/edit.jsp");
          prd.include(rReq, rRes);
-*/
       }
       else if (CMSAdminConstants.OP_EXPORTARCHIVE.equals(op))
       {




More information about the jboss-svn-commits mailing list