[jboss-cvs] jboss-portal/core/src/main/org/jboss/portal/core/portlet/cms ...
Roy Russo
russo at jboss.com
Tue Jul 11 17:07:00 EDT 2006
User: russo
Date: 06/07/11 17:07:00
Modified: core/src/main/org/jboss/portal/core/portlet/cms
CMSPortlet.java
Log:
JBPORTAL-947 - done.
Revision Changes Path
1.48 +21 -2 jboss-portal/core/src/main/org/jboss/portal/core/portlet/cms/CMSPortlet.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CMSPortlet.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/core/src/main/org/jboss/portal/core/portlet/cms/CMSPortlet.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- CMSPortlet.java 27 Jun 2006 18:31:51 -0000 1.47
+++ CMSPortlet.java 11 Jul 2006 21:07:00 -0000 1.48
@@ -51,7 +51,7 @@
*
* @author <a href="mailto:roy at jboss.org">Roy Russo</a>
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.47 $
+ * @version $Revision: 1.48 $
* <p/>
* TODO: use portlet preferences for default homepage, and allow for preference modification in doEdit()
*/
@@ -160,8 +160,17 @@
// Get the file from the CMS, localized.
Command fileGet;
+ File file = null;
if(path == null)
{
+ fileGet = CMSService.getCommandFactory().createFileGetCommand(indexpage, req.getLocale());
+ file = (File) CMSService.execute(fileGet);
+ if(file == null)
+ {
+ fileGet = CMSService.getCommandFactory().createFileGetCommand(indexpage, new Locale(CMSService.getDefaultLocale()));
+ file = (File) CMSService.execute(fileGet);
+ }
+/*
Command itemExistsCMD = CMSService.getCommandFactory().createItemExistsCommand(indexpage + "/" + req.getLocale().getLanguage());
Boolean bExists = (Boolean) CMSService.execute(itemExistsCMD);
if(bExists.booleanValue())
@@ -172,9 +181,18 @@
{
fileGet = CMSService.getCommandFactory().createFileGetCommand(indexpage, new Locale(CMSService.getDefaultLocale()));
}
+*/
}
else
{
+ fileGet = CMSService.getCommandFactory().createFileGetCommand(path, req.getLocale());
+ file = (File) CMSService.execute(fileGet);
+ if(file == null)
+ {
+ fileGet = CMSService.getCommandFactory().createFileGetCommand(path, new Locale(CMSService.getDefaultLocale()));
+ file = (File) CMSService.execute(fileGet);
+ }
+/*
Command itemExistsCMD = CMSService.getCommandFactory().createItemExistsCommand(path + "/" + req.getLocale().getLanguage());
Boolean bExists = (Boolean) CMSService.execute(itemExistsCMD);
if(bExists.booleanValue())
@@ -185,9 +203,10 @@
{
fileGet = CMSService.getCommandFactory().createFileGetCommand(path, new Locale(CMSService.getDefaultLocale()));
}
+*/
}
- File file = (File) CMSService.execute(fileGet);
+// File file = (File) CMSService.execute(fileGet);
// Translate links to resources.
String sHTML = null;
More information about the jboss-cvs-commits
mailing list