svn commit: r681276 - in /ofbiz/trunk: applications/content/src/org/ofbiz/content/content/ applications/content/src/org/ofbiz/content/webapp/ftl/ applications/content/webapp/content/cms/ applications/ecommerce/data/ applications/ecommerce/script/org/of...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r681276 - in /ofbiz/trunk: applications/content/src/org/ofbiz/content/content/ applications/content/src/org/ofbiz/content/webapp/ftl/ applications/content/webapp/content/cms/ applications/ecommerce/data/ applications/ecommerce/script/org/of...

jonesde
Author: jonesde
Date: Wed Jul 30 22:03:31 2008
New Revision: 681276

URL: http://svn.apache.org/viewvc?rev=681276&view=rev
Log:
Deprecating the loopSubContentCache transform because it is a huge mess and the loopSubContent uses the cache anyway; also found that the DemoWebSitePublishPointData.xml file had half of the ContentAssocs going one way, and half another; that is now fixed so they always go from parent to child; this required changes to the loopSubContent transform and various other cleanups along the way and a few fixes; some of these sample uses of the content infrastructure have got to be close to the worst code I've so hopefully someone will have some time to continue cleaning this up and keep their head about them while doing so in order to not make it worse

Removed:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentCacheTransform.java
Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
    ofbiz/trunk/applications/content/webapp/content/cms/AdminSearch.ftl
    ofbiz/trunk/applications/content/webapp/content/cms/CMSContentEdit.ftl
    ofbiz/trunk/applications/content/webapp/content/cms/CMSSites.ftl
    ofbiz/trunk/applications/ecommerce/data/DemoBlogPubPtData.xml
    ofbiz/trunk/applications/ecommerce/data/DemoFactoids.xml
    ofbiz/trunk/applications/ecommerce/data/DemoTree.xml
    ofbiz/trunk/applications/ecommerce/data/DemoWebSitePublishPointData.xml
    ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/topic.ftl
    ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/tree.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/content_categories.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/factoids.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/searchContent.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/showcontenttree.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/viewcontent.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/bloglib.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showblog.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl
    ofbiz/trunk/framework/webapp/config/applicationTransforms.properties

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java Wed Jul 30 22:03:31 2008
@@ -26,6 +26,8 @@
 import java.util.Locale;
 import java.util.Map;
 
+import javolution.util.FastMap;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilDateTime;
@@ -172,7 +174,7 @@
                          ,null);
 
         }
-        HashMap results = new HashMap();
+        Map results = FastMap.newInstance();
         results.put("entityList", relatedAssocs);
         return results;
     }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java Wed Jul 30 22:03:31 2008
@@ -78,22 +78,22 @@
         //Profiler.begin("Limited");
         final StringBuffer buf = new StringBuffer();
         final Environment env = Environment.getCurrentEnvironment();
-        //final Map templateRoot = (Map) FreeMarkerWorker.getWrappedObject("context", env);
         final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env);
-        //FreeMarkerWorker.convertContext(templateRoot);
         final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env);
         final HttpServletRequest request = (HttpServletRequest) FreeMarkerWorker.getWrappedObject("request", env);
         FreeMarkerWorker.getSiteParameters(request, templateRoot);
-        //templateRoot.put("buf", buf);
         final Map savedValuesUp = new HashMap();
         FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp);
         final Map savedValues = new HashMap();
         FreeMarkerWorker.overrideWithArgs(templateRoot, args);
+
         String contentAssocTypeId = (String) templateRoot.get("contentAssocTypeId");
+        if (UtilValidate.isEmpty(contentAssocTypeId)) {
+            contentAssocTypeId = "SUB_CONTENT";
+            templateRoot.put("contentAssocTypeId ", contentAssocTypeId);
+        }
+        
         final Map pickedEntityIds = new HashMap();
-        //if (UtilValidate.isEmpty(contentAssocTypeId)) {
-        //throw new RuntimeException("contentAssocTypeId is empty");
-        //}
         List assocTypes = StringUtil.split(contentAssocTypeId, "|");
 
         String contentPurposeTypeId = (String) templateRoot.get("contentPurposeTypeId");
@@ -129,7 +129,9 @@
         String strNullThruDatesOnly = (String) templateRoot.get("nullThruDatesOnly");
         String orderBy = (String) templateRoot.get("orderBy");
         Boolean nullThruDatesOnly = (strNullThruDatesOnly != null && strNullThruDatesOnly.equalsIgnoreCase("true")) ? Boolean.TRUE : Boolean.FALSE;
-        String contentId = (String) templateRoot.get("subContentId");
+        
+        // NOTE this was looking for subContentId, but that doesn't make ANY sense, so changed to contentId
+        String contentId = (String) templateRoot.get("contentId");
 
         templateRoot.put("contentId", null);
         templateRoot.put("subContentId", null);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java Wed Jul 30 22:03:31 2008
@@ -51,8 +51,8 @@
 
     public static final String module = LoopSubContentTransform.class.getName();
 
-    public static final String [] saveKeyNames = {"contentId", "subContentId", "mimeType", "subContentDataResourceView", "wrapTemplateId", "contentTemplateId"};
-    public static final String [] removeKeyNames = {"wrapTemplateId", "entityList", "entityIndex", "textData", "dataResourceId","drDataResourceId", "subContentIdSub", "parentContent", "wrappedFTL"};
+    public static final String[] saveKeyNames = {"contentId", "subContentId", "mimeType", "subContentDataResourceView", "wrapTemplateId", "contentTemplateId"};
+    public static final String[] removeKeyNames = {"wrapTemplateId", "entityList", "entityIndex", "textData", "dataResourceId","drDataResourceId", "subContentIdSub", "parentContent", "wrappedFTL"};
 
     /**
      * A wrapper for the FreeMarkerWorker version.
@@ -70,13 +70,9 @@
     }
 
     public static boolean prepCtx(GenericDelegator delegator, Map ctx) {
-
-        //String contentId = (String)ctx.get("contentId");
-        //String mimeTypeId = (String)ctx.get("mimeTypeId");
         List lst = (List) ctx.get("entityList");
         Integer idx = (Integer) ctx.get("entityIndex");
-        if (idx == null)
-            idx = new Integer(0);
+        if (idx == null) idx = new Integer(0);
         int i = idx.intValue();
         if (i >= lst.size()) {
             return false;
@@ -91,9 +87,9 @@
         }
 
         String dataResourceId = (String) subContentDataResourceView.get("drDataResourceId");
-        String subContentIdSub = (String) subContentDataResourceView.get("contentId");
+        String subContentIdSub = (String) subContentDataResourceView.get("contentId"); // in ContentAssocDataResourceViewTo
         // This order is taken so that the dataResourceType can be overridden in the transform arguments.
-        String subDataResourceTypeId = (String)ctx.get("subDataResourceTypeId");
+        String subDataResourceTypeId = (String) ctx.get("subDataResourceTypeId");
         if (UtilValidate.isEmpty(subDataResourceTypeId)) {
             subDataResourceTypeId = (String) subContentDataResourceView.get("drDataResourceTypeId");
             // TODO: If this value is still empty then it is probably necessary to get a value from
@@ -101,7 +97,7 @@
             // being passed.
         }
         // This order is taken so that the mimeType can be overridden in the transform arguments.
-        String mimeTypeId = (String)ctx.get("mimeTypeId");
+        String mimeTypeId = (String) ctx.get("mimeTypeId");
         if (UtilValidate.isEmpty(mimeTypeId)) {
             mimeTypeId = (String) subContentDataResourceView.get("mimeTypeId");
             String parentContentId = (String)ctx.get("contentId");
@@ -121,10 +117,12 @@
 
         // This is what the FM template will see.
         ctx.put("subContentDataResourceView", subContentDataResourceView);
-        if (electronicText != null)
+        if (electronicText != null) {
             ctx.put("textData", electronicText.get("textData"));
-        else
+        } else {
             ctx.put("textData", null);
+        }
+        ctx.put("content", subContentDataResourceView);
         ctx.put("entityIndex", new Integer(i + 1));
         ctx.put("subContentId", subContentIdSub);
         ctx.put("drDataResourceId", dataResourceId);
@@ -139,17 +137,17 @@
         final StringBuffer buf = new StringBuffer();
         final Environment env = Environment.getCurrentEnvironment();
         final Map templateCtx = (Map) FreeMarkerWorker.getWrappedObject("context", env);
-        //FreeMarkerWorker.convertContext(templateCtx);
         final LocalDispatcher dispatcher = (LocalDispatcher) FreeMarkerWorker.getWrappedObject("dispatcher", env);
         final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env);
-        //templateCtx.put("buf", buf);
         final Map savedValues = FreeMarkerWorker.saveValues(templateCtx, saveKeyNames);
         FreeMarkerWorker.overrideWithArgs(templateCtx, args);
-        String contentAssocTypeId = (String)templateCtx.get("contentAssocTypeId");
+        
+        String contentAssocTypeId = (String) templateCtx.get("contentAssocTypeId");
         if (UtilValidate.isEmpty(contentAssocTypeId)) {
             contentAssocTypeId = "SUB_CONTENT";
-            templateCtx.put("contentAssocTypeId ", contentAssocTypeId );
+            templateCtx.put("contentAssocTypeId ", contentAssocTypeId);
         }
+        
         List assocTypes = UtilMisc.toList(contentAssocTypeId);
         templateCtx.put("assocTypes", assocTypes);
         Locale locale = (Locale) templateCtx.get("locale");
@@ -158,55 +156,21 @@
             templateCtx.put("locale", locale);
         }
 
-/*
-        final String editTemplate = getArg(args, "editTemplate", ctx);
-        final String wrapTemplateId = getArg(args, "wrapTemplateId", ctx);
-        final String mapKey = getArg(args, "mapKey", ctx);
-        final String templateContentId = getArg(args, "templateContentId", ctx);
-        final String subDataResourceTypeId = getArg(args, "subDataResourceTypeId", ctx);
-        final String contentId = getArg(args, "contentId", ctx);
-        final String rootDir = getArg(args, "rootDir", ctx);
-        final String webSiteId = getArg(args, "webSiteId", ctx);
-        final String https = getArg(args, "https", ctx);
-        final String viewSize = getArg(args, "viewSize", ctx);
-        final String viewIndex = getArg(args, "viewIndex", ctx);
-        final String listSize = getArg(args, "listSize", ctx);
-        final String highIndex = getArg(args, "highIndex", ctx);
-        final String lowIndex = getArg(args, "lowIndex", ctx);
-        final String queryString = getArg(args, "queryString", ctx);
-        final Locale locale = (Locale) FreeMarkerWorker.getWrappedObject("locale", env);
-        final String mimeTypeId = getArg(args, "mimeTypeId", ctx);
-        //final LocalDispatcher dispatcher = (LocalDispatcher) FreeMarkerWorker.getWrappedObject("dispatcher", env);
-        final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env);
-        //final GenericValue userLogin = (GenericValue) FreeMarkerWorker.getWrappedObject("userLogin", env);
-
-        ctx.put("mapKey", mapKey);
-        ctx.put("contentId", contentId);
-        ctx.put("templateContentId", templateContentId);
-        ctx.put("locale", locale);
-
-        //ctx.put("userLogin", userLogin);
-        String contentAssocTypeId = getArg(args, "contentAssocTypeId", ctx);
-        if (UtilValidate.isEmpty(contentAssocTypeId))
-            contentAssocTypeId = "SUB_CONTENT";
-        List assocTypes = UtilMisc.toList(contentAssocTypeId);
-        ctx.put("assocTypes", assocTypes);
-*/
-        String fromDateStr = (String)templateCtx.get("fromDateStr");
+        String fromDateStr = (String) templateCtx.get("fromDateStr");
         Timestamp fromDate = null;
         if (UtilValidate.isNotEmpty(fromDateStr)) {
             fromDate = UtilDateTime.toTimestamp(fromDateStr);
         }
-        if (fromDate == null)
-            fromDate = UtilDateTime.nowTimestamp();
-        String thisContentId = (String)templateCtx.get("contentId");
-        if (UtilValidate.isEmpty(thisContentId)) {
-            thisContentId = (String)templateCtx.get("subContentId");
-        }
+        if (fromDate == null) fromDate = UtilDateTime.nowTimestamp();
+        
+        String thisContentId = (String) templateCtx.get("contentId");
+        
+        //DEJ20080730 Should always use contentId, not subContentId since we're searching for that and it is confusing
+        //if (UtilValidate.isEmpty(thisContentId)) thisContentId = (String)templateCtx.get("subContentId");
+        
         String thisMapKey = (String)templateCtx.get("mapKey");
         //GenericValue subContentDataResourceView = null;
-        Map results =
-            ContentServicesComplex.getAssocAndContentAndDataResourceMethod(delegator, thisContentId, thisMapKey, "From", fromDate, null, null, null, assocTypes, null);
+        Map results = ContentServicesComplex.getAssocAndContentAndDataResourceMethod(delegator, thisContentId, thisMapKey, null, fromDate, null, null, null, assocTypes, null);
         List entityList = (List) results.get("entityList");
         templateCtx.put("entityList", entityList);
 
@@ -214,8 +178,6 @@
 
             public void write(char cbuf[], int off, int len) {
                 buf.append(cbuf, off, len);
-                //StringBuffer ctxBuf = (StringBuffer) templateCtx.get("buf");
-                //ctxBuf.append(cbuf, off, len);
             }
 
             public void flush() throws IOException {
@@ -236,18 +198,17 @@
                 Integer idx = (Integer) templateCtx.get("entityIndex");
                 int i = idx.intValue();
                 boolean inProgress = prepCtx(delegator, templateCtx);
-                //out.write(buf.toString());
-                //buf.setLength(0);
-                if (inProgress)
+                if (inProgress) {
                     return TransformControl.REPEAT_EVALUATION;
-                else
+                } else {
                     return TransformControl.END_EVALUATION;
+                }
             }
 
             public void close() throws IOException {
 
                 String wrappedFTL = buf.toString();
-                String encloseWrappedText = (String)templateCtx.get("encloseWrappedText");
+                String encloseWrappedText = (String) templateCtx.get("encloseWrappedText");
                 if (UtilValidate.isEmpty(encloseWrappedText) || encloseWrappedText.equalsIgnoreCase("false")) {
                     out.write(wrappedFTL);
                     wrappedFTL = ""; // So it won't get written again below.
@@ -258,24 +219,13 @@
                     
                     Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env);
                     
-/*
-                    templateRoot.put("viewSize", viewSize);
-                    templateRoot.put("viewIndex", viewIndex);
-                    templateRoot.put("listSize", listSize);
-                    templateRoot.put("highIndex", highIndex);
-                    templateRoot.put("lowIndex", lowIndex);
-                    templateRoot.put("queryString", queryString);
-                    templateRoot.put("wrapMapKey", mapKey);
-*/
                     templateRoot.put("wrapDataResourceTypeId", templateCtx.get("subDataResourceTypeId"));
                     templateRoot.put("wrapContentIdTo", templateCtx.get("contentId"));
                     templateRoot.put("wrapMimeTypeId", templateCtx.get("mimeTypeId"));
                     templateRoot.put("context", templateCtx);
                     
-
                     Locale locale = (Locale) templateCtx.get("locale");
-                    if (locale == null)
-                        locale = Locale.getDefault();
+                    if (locale == null) locale = Locale.getDefault();
                     String mimeTypeId = (String) templateCtx.get("mimeTypeId");
                     try {
                         ContentWorker.renderContentAsText(dispatcher, delegator, wrapTemplateId, out, templateRoot, locale, mimeTypeId, true);
@@ -284,11 +234,12 @@
                         throw new IOException("Error rendering content" + e.toString());
                     }
                 } else {
-                    if (UtilValidate.isNotEmpty(wrappedFTL))
+                    if (UtilValidate.isNotEmpty(wrappedFTL)) {
                         out.write(wrappedFTL);
+                    }
                 }
-                    FreeMarkerWorker.removeValues(templateCtx, removeKeyNames);
-                    FreeMarkerWorker.reloadValues(templateCtx, savedValues, env);
+                FreeMarkerWorker.removeValues(templateCtx, removeKeyNames);
+                FreeMarkerWorker.reloadValues(templateCtx, savedValues, env);
             }
         };
     }

Modified: ofbiz/trunk/applications/content/webapp/content/cms/AdminSearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/cms/AdminSearch.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/cms/AdminSearch.ftl (original)
+++ ofbiz/trunk/applications/content/webapp/content/cms/AdminSearch.ftl Wed Jul 30 22:03:31 2008
@@ -132,13 +132,8 @@
       <#local indent = indent + "&nbsp;&nbsp;"/>
     </#list>
   </#if>
-<@loopSubContentCache subContentId=contentId
-    viewIndex=0
-    viewSize=9999
-    contentAssocTypeId="SUBSITE"
-    returnAfterPickWhen="1==1";
->
+<@loopSubContent contentId=contentId viewIndex=0 viewSize=9999 contentAssocTypeId="SUBSITE" returnAfterPickWhen="1==1";>
   <option value="${content.contentId?lower_case}">${indent}${content.description}</option>
   <@listSiteIds contentId=content.contentId indentIndex=indentIndex + 1 />
-</@loopSubContentCache >
+</@loopSubContent>
 </#macro>

Modified: ofbiz/trunk/applications/content/webapp/content/cms/CMSContentEdit.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/cms/CMSContentEdit.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/cms/CMSContentEdit.ftl (original)
+++ ofbiz/trunk/applications/content/webapp/content/cms/CMSContentEdit.ftl Wed Jul 30 22:03:31 2008
@@ -314,12 +314,7 @@
 </#if>
 
 
-<@loopSubContentCache subContentId=forumId
-    viewIndex=viewIdx
-    viewSize=viewSz
-    contentAssocTypeId="SUBSITE"
-    returnAfterPickWhen="1==1";
->
+<@loopSubContent contentId=forumId viewIndex=viewIdx viewSize=viewSz contentAssocTypeId="SUBSITE" returnAfterPickWhen="1==1";>
     <#local isPublished = "" />
     <#assign contentAssocViewFrom=Static["org.ofbiz.content.content.ContentWorker"].getContentAssocViewFrom(delegator, subContentId, contentId, "PUBLISH_LINK", null, null)?if_exists />
     <#if contentAssocViewFrom?has_content>
@@ -341,6 +336,6 @@
        </tr>
        <#assign rowCount = rowCount + 1 />
        <@publishContent forumId=subContentId contentId=contentId indentIndex=(indentIndex + 1)/>
-</@loopSubContentCache >
+</@loopSubContent>
 
 </#macro>

Modified: ofbiz/trunk/applications/content/webapp/content/cms/CMSSites.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/cms/CMSSites.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/cms/CMSSites.ftl (original)
+++ ofbiz/trunk/applications/content/webapp/content/cms/CMSSites.ftl Wed Jul 30 22:03:31 2008
@@ -119,12 +119,7 @@
 </#if>
 
 
-<@loopSubContentCache subContentId=forumId
-    viewIndex=0
-    viewSize=9999
-    contentAssocTypeId="SUBSITE"
-    returnAfterPickWhen="1==1";
->
+<@loopSubContent contentId=forumId viewIndex=0 viewSize=9999 contentAssocTypeId="SUBSITE" returnAfterPickWhen="1==1";>
        <tr>
          <td class="tabletext" >
             ${indent}
@@ -149,7 +144,7 @@
        </tr>
        <#assign rowCount = rowCount + 1 />
        <@showSites forumId=subContentId indentIndex=(indentIndex + 1)/>
-</@loopSubContentCache >
+</@loopSubContent>
 
 </#macro>
 

Modified: ofbiz/trunk/applications/ecommerce/data/DemoBlogPubPtData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoBlogPubPtData.xml?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoBlogPubPtData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoBlogPubPtData.xml Wed Jul 30 22:03:31 2008
@@ -47,7 +47,7 @@
 <ContentAssoc
  contentId="BLOGROOT"
  contentIdTo="BLOGROOTBIGAL"  
- contentAssocTypeId="SUBSITE"
+ contentAssocTypeId="SUB_CONTENT"
  fromDate="2004-11-22 17:32:33.987"
  createdByUserLogin="admin"
  lastModifiedByUserLogin="admin"
@@ -69,7 +69,7 @@
 <ContentAssoc
  contentId="BLOGROOT"
  contentIdTo="BLOGROOTMADMAX"  
- contentAssocTypeId="SUBSITE"
+ contentAssocTypeId="SUB_CONTENT"
  fromDate="2004-11-22 17:32:33.987"
  createdByUserLogin="admin"
  lastModifiedByUserLogin="admin"

Modified: ofbiz/trunk/applications/ecommerce/data/DemoFactoids.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoFactoids.xml?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoFactoids.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoFactoids.xml Wed Jul 30 22:03:31 2008
@@ -64,10 +64,10 @@
     <Content contentId="FACT_5" contentTypeId="DOCUMENT" ownerContentId="WebStoreFACTOID" dataResourceId="FACT_5" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_BRONZE" contentName="Gizmos are safe" description="Gizmos are safe" createdDate="2004-03-30 07:57:39.671" createdByUserLogin="admin" lastModifiedDate="2004-03-30 07:57:39.671" lastModifiedByUserLogin="admin" lastUpdatedStamp="2004-03-30 07:57:53.174" createdStamp="2004-03-30 07:57:39.671"/>
     <ContentAssoc contentId="FACT_5" contentIdTo="WebStoreFACTOID" contentAssocTypeId="PUBLISH_LINK" fromDate="2004-03-30 07:57:53.141" createdDate="2004-03-30 07:57:53.145" createdByUserLogin="admin" lastModifiedDate="2004-03-30 07:57:53.145" lastModifiedByUserLogin="admin" lastUpdatedStamp="2004-03-30 07:57:53.151" createdStamp="2004-03-30 07:57:53.151"/>
 
-    <ContentAssoc contentId="FACT_1" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="FACT_2" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="FACT_3" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="FACT_4" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="FACT_5" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="FACT_1" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUB_CONTENT" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="FACT_2" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUB_CONTENT" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="FACT_3" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUB_CONTENT" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="FACT_4" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUB_CONTENT" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="FACT_5" contentIdTo="WebStoreFACTOID" contentAssocTypeId="SUB_CONTENT" fromDate="2004-03-01 12:00:00.000" createdDate="2004-03-01 12:00:00.000" createdByUserLogin="admin"/>
 </entity-engine-xml>
 

Modified: ofbiz/trunk/applications/ecommerce/data/DemoTree.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoTree.xml?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoTree.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoTree.xml Wed Jul 30 22:03:31 2008
@@ -21,16 +21,13 @@
 <entity-engine-transform-xml template="org/ofbiz/ecommerce/data/tree.ftl">
     <topic_tree>
         <topic id="9401">
-            <child id="180000" type="content">
-            </child>
+            <child id="180000" type="content"/>
         </topic>
         <topic id="9402">
-            <child id="180001" type="content">
-            </child>
+            <child id="180001" type="content"/>
         </topic>
         <topic id="9402">
-            <child id="180002" type="content">
-            </child>
+            <child id="180002" type="content"/>
         </topic>
     </topic_tree>
 </entity-engine-transform-xml>

Modified: ofbiz/trunk/applications/ecommerce/data/DemoWebSitePublishPointData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoWebSitePublishPointData.xml?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoWebSitePublishPointData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoWebSitePublishPointData.xml Wed Jul 30 22:03:31 2008
@@ -22,48 +22,42 @@
     
     <!-- NOTE DEJ20060610 This is just a skeleton for the most part and does not have complete content -->
     <Content contentId="WebStoreCONTENT" contentTypeId="WEB_SITE_PUB_PT" contentName="WebStore Content Root" description="Ecommerce Content Categories"/>
-    <Content contentId="WIDGETSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Care &amp; Groom" description="Care and Grooming" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <Content contentId="WIDGETSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Sightings" description="Sightings of Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
+    <WebSiteContent webSiteId="WebStore" contentId="WebStoreCONTENT" webSiteContentTypeId="PUBLISH_POINT" fromDate="2001-01-01 00:00:00"/>
+    
     <Content contentId="CNTGIZMOS" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Gizmos" description="Gizmos" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
+    <ContentAssoc contentId="WebStoreCONTENT" contentIdTo="CNTGIZMOS" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAttribute contentId="CNTGIZMOS" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
+    
+    <Content contentId="CNTGIZMOSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Large Gizmos" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="CNTGIZMOS" contentIdTo="CNTGIZMOSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    
+    <Content contentId="CNTGIZMOSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Small Gizmos" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="CNTGIZMOS" contentIdTo="CNTGIZMOSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    
     <Content contentId="GIZMOSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Advocacy" description="Advocacy" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <ContentAssoc contentId="GIZMOSLRG" contentIdTo="CNTGIZMOS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="CNTGIZMOS" contentIdTo="GIZMOSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
 
     <Content contentId="GIZMOSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Case Studies" description="Case Studies" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <ContentAssoc contentId="GIZMOSSML" contentIdTo="CNTGIZMOS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
+    <ContentAssoc contentId="CNTGIZMOS" contentIdTo="GIZMOSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    
     <Content contentId="CNTWIDGETS" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Widgets" description="Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
     <ContentAttribute contentId="CNTWIDGETS" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
+    <ContentAssoc contentId="WebStoreCONTENT" contentIdTo="CNTWIDGETS" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
 
-    <ContentAssoc contentId="CNTWIDGETS" contentIdTo="WebStoreCONTENT" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="WIDGETSSML" contentIdTo="CNTWIDGETS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="WIDGETSLRG" contentIdTo="CNTWIDGETS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <Content contentId="WIDGETSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Sightings" description="Sightings of Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="CNTWIDGETS" contentIdTo="WIDGETSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <Content contentId="WIDGETSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Care &amp; Groom" description="Care and Grooming" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="CNTWIDGETS" contentIdTo="WIDGETSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
 
     <Content contentId="CNTWIDGETSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTWIDGETS" contentName="Large Widgets" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <ContentAssoc contentId="CNTWIDGETSLRG" contentIdTo="CNTWIDGETS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="CNTWIDGETS" contentIdTo="CNTWIDGETSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
 
     <Content contentId="CNTWIDGETSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTWIDGETS" contentName="Small Widgets" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="CNTWIDGETS" contentIdTo="CNTWIDGETSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
 
-    <ContentAssoc contentId="CNTWIDGETSSML" contentIdTo="CNTWIDGETS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <ContentAssoc contentId="CNTGIZMOS" contentIdTo="WebStoreCONTENT" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAttribute contentId="CNTGIZMOS" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
-
-    <Content contentId="CNTGIZMOSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Large Gizmos" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <ContentAssoc contentId="CNTGIZMOSLRG" contentIdTo="CNTGIZMOS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <Content contentId="CNTGIZMOSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Small Gizmos" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-
-    <ContentAssoc contentId="CNTGIZMOSSML" contentIdTo="CNTGIZMOS" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
 
     <Content contentId="POLICY" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Policies" description="Policies" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="POLICY" contentIdTo="WebStoreCONTENT" contentAssocTypeId="SUBSITE" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="WebStoreCONTENT" contentIdTo="POLICY" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
     <ContentAttribute contentId="POLICY" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
 
     <Content contentId="WebStoreFACTOID" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="" contentName="Factoids" description="Factoids" createdDate="2004-07-05 12:00:00.000" createdByUserLogin="admin"/>
@@ -84,8 +78,8 @@
         ]]></textData>
     </ElectronicText>
     <Content contentId="STORE_POLICIES" contentTypeId="DOCUMENT" ownerContentId="WebStoreCONTENT" dataResourceId="STORE_POLICIES"
-        contentName="Store Policies" description="Store Policies" mimeTypeId="text/html" localeString="en_US" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES" mapKey="policies" contentAssocTypeId="SUBSITE"
+        contentName="Store Policies 1" description="Store Policies 1 Description" mimeTypeId="text/html" localeString="en_US" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES" mapKey="policies" contentAssocTypeId="SUB_CONTENT"
         fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
     <DataResource dataResourceId="STORE_POLICIES2" dataResourceTypeId="ELECTRONIC_TEXT" mimeTypeId="text/html" localeString="en_US" isPublic="Y" dataResourceName="Store Policies"/>
     <ElectronicText dataResourceId="STORE_POLICIES2">
@@ -101,7 +95,7 @@
         ]]></textData>
     </ElectronicText>
     <Content contentId="STORE_POLICIES2" contentTypeId="DOCUMENT" ownerContentId="WebStoreCONTENT" dataResourceId="STORE_POLICIES2"
-        contentName="Store Policies" description="Store Policies" mimeTypeId="text/html" localeString="en_US" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
-    <ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES2" mapKey="policies2" contentAssocTypeId="SUBSITE"
+        contentName="Store Policies 2" description="Store Policies 2 Description" mimeTypeId="text/html" localeString="en_US" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
+    <ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES2" mapKey="policies2" contentAssocTypeId="SUB_CONTENT"
         fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/topic.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/topic.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/topic.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/topic.ftl Wed Jul 30 22:03:31 2008
@@ -34,7 +34,7 @@
     <#assign firstPart=internalNameParts[0] />
     <#assign nowStamp=Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp()/>
     <#if firstPart == "WIDGETS">
-        <ContentAssoc contentId="${contentId}" contentIdTo="CNTWIDGETS" contentAssocTypeId="SUBSITE" fromDate="${nowStamp?string("yyyy-MM-dd HH:mm:ss")}"/>
+        <ContentAssoc contentId="CNTWIDGETS" contentIdTo="${contentId}" contentAssocTypeId="SUB_CONTENT" fromDate="${nowStamp?string("yyyy-MM-dd HH:mm:ss")}"/>
     </#if>
 </#macro>
 

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/tree.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/tree.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/tree.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/data/tree.ftl Wed Jul 30 22:03:31 2008
@@ -27,15 +27,15 @@
 </#macro>
 
 <#macro topic>
-    <#assign contentIdTo="ECMT" + .node.@id[0]/>
+    <#assign contentId="ECMT" + .node.@id[0]/>
     <#recurse .node>
 </#macro>
 
 <#macro child>
-    <#assign contentId="ECMT" + .node.@id[0]/>
-    <#assign assocType="SUBSITE"/>
+    <#assign contentIdTo="ECMT" + .node.@id[0]/>
+    <#assign assocType="SUB_CONTENT"/>
     <#if .node.@type = "content">
-        <#assign contentId="ECMC" + .node.@id[0]/>
+        <#assign contentIdTo="ECMC" + .node.@id[0]/>
         <#assign assocType="PUBLISH_LINK"/>
     </#if>
     <#assign nowStamp=Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp()/>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/content_categories.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/content_categories.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/content_categories.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/content_categories.ftl Wed Jul 30 22:03:31 2008
@@ -16,7 +16,7 @@
 specific language governing permissions and limitations
 under the License.
 -->
-<#assign forumRootId = "WebStoreCONTENT"/>
+<#assign contentRootId = "WebStoreCONTENT"/>
 
 <#-- variable setup and worker calls -->
 <#assign curCategoryId = requestAttributes.curCategoryId?if_exists>
@@ -36,11 +36,11 @@
     </div>
     <div class="screenlet-body">
         <#assign count_1=0/>
-        <@loopSubContentCache subContentId=forumRootId viewIndex=0 viewSize=9999 orderBy="contentName" contentAssocTypeId="SUBSITE">
+        <@loopSubContent contentId=contentRootId viewIndex=0 viewSize=9999 orderBy="contentName">
             <div class="browsecategorytext" style="margin-left: 10px">
                -&nbsp;<a href="<@ofbizUrl>showcontenttree?contentId=${subContentId}&amp;nodeTrailCsv=${subContentId}</@ofbizUrl>" class="browsecategorybutton">${content.contentName}</a>
             </div>
             <#assign count_1=(count_1 + 1)/>
-        </@loopSubContentCache>
+        </@loopSubContent>
     </div>
 </div>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/factoids.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/factoids.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/factoids.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/factoids.ftl Wed Jul 30 22:03:31 2008
@@ -36,7 +36,7 @@
     </div>
     <div class="screenlet-body">
         <#assign count_1=0/>
-        <@limitedSubContent subContentId=factoidRootId viewIndex=0 viewSize=9999 orderBy="contentName" contentAssocTypeId="SUBSITE" limitSize="2">
+        <@limitedSubContent contentId=factoidRootId viewIndex=0 viewSize=9999 orderBy="contentName" limitSize="2">
             <div class="browsecategorytext" style="margin-left: 10px">
               -&nbsp;<@renderSubContentCache subContentId=subContentId/>
             </div>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/searchContent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/searchContent.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/searchContent.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/searchContent.ftl Wed Jul 30 22:03:31 2008
@@ -108,13 +108,8 @@
       <#local indent = indent + "&nbsp;&nbsp;"/>
     </#list>
   </#if>
-<@loopSubContentCache subContentId=contentId
-    viewIndex=0
-    viewSize=9999
-    contentAssocTypeId="SUBSITE"
-    returnAfterPickWhen="1==1";
->
+<@loopSubContent contentId=contentId viewIndex=0 viewSize=9999 returnAfterPickWhen="1==1";>
   <option value="${content.contentId?lower_case}">${indent}${content.description}</option>
   <@listSiteIds contentId=content.contentId indentIndex=indentIndex + 1 />
-</@loopSubContentCache >
+</@loopSubContent>
 </#macro>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/showcontenttree.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/showcontenttree.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/showcontenttree.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/showcontenttree.ftl Wed Jul 30 22:03:31 2008
@@ -19,6 +19,7 @@
 
 <#include "bloglib.ftl" />
 <#assign siteId = requestParameters.contentId?if_exists />
+
 <@renderAncestryPath trail=ancestorList?default([]) endIndexOffset=1 siteId=siteId searchOn="true"/>
 
 <#if ancestorList?has_content && (0 < ancestorList?size) >
@@ -27,7 +28,7 @@
               <a class="tabButton" href="<@ofbizUrl>searchContent?siteId=${lastContent.contentId?if_exists}</@ofbizUrl>" >${uiLabelMap.CommonSearch}</a>
     </h1>
 </#if>
-<table border="0">
+
 <#assign viewIdx = "" />
 <#if requestParameters.viewIndex?has_content>
 <#assign viewIdx = requestParameters.viewIndex?if_exists />
@@ -51,60 +52,47 @@
 <#assign dummy=Static["org.ofbiz.base.util.Debug"].logInfo("in showcontenttree, siteId:" + siteId, "")/>
 <#assign dummy=Static["org.ofbiz.base.util.Debug"].logInfo("in showcontenttree, nodeTrail:" + nodeTrail, "")/>
 -->
+
 <div style="padding-left:20px;">
-         <@renderCategoryBrowse contentId=siteId indentIndex=1 nodeTrail=nodeTrail />
+    <@renderCategoryBrowse contentId=siteId indentIndex=1 nodeTrail=nodeTrail />
 </div>
-</table>
-
-
-
 
 <#macro renderCategoryBrowse contentId="" indentIndex=0 nodeTrail=[] viewSz=9999 viewIdx=0>
-
-<#local contentIdx = contentId?if_exists />
-<#if (!contentIdx?exists || contentIdx?length == 0)>
-    <#local contentIdx = page.contentIdx?if_exists />
-    <#if (!contentIdx?exists || contentIdx?length == 0)>
-    </#if>
-</#if>
-
-<#local thisContentId=nodeTrail[indentIndex]?if_exists/>
-
-<#local thisNodeTrailCsv = "" />
-<#local listUpper = (indentIndex - 1) />
-<#if nodeTrail?size < listUpper >
-    <#local listUpper = (nodeTrail?size - 1)>
-</#if>
-<#list 0..listUpper as idx>
-    <#if thisNodeTrailCsv?has_content>
-        <#local thisNodeTrailCsv = thisNodeTrailCsv + ","/>
-    </#if>
-    <#local thisNodeTrailCsv = thisNodeTrailCsv + nodeTrail[idx]>
-</#list>
-<#--
-<#assign dummy=Static["org.ofbiz.base.util.Debug"].logInfo("in showcontenttree, contentIdx:" + contentIdx, "")/>
--->
-<!-- Look for content first -->
-<@loopSubContentCache subContentId=contentIdx
-    viewIndex=viewIdx
-    viewSize=viewSz
-    contentAssocTypeId="PUBLISH_LINK"
-    returnAfterPickWhen="1==1";
->
-<#assign dummy=Static["org.ofbiz.base.util.Debug"].logInfo("in showcontenttree, nodeTrailCsv(1):" + nodeTrailCsv, "")/>
-       <#local thisCsv=thisNodeTrailCsv + "," + subContentId />
-            <a class="tabButton" href="<@ofbizUrl>viewcontent?contentId=${subContentId?if_exists}&nodeTrailCsv=${thisCsv}</@ofbizUrl>" >${uiLabelMap.CommonView}</a>  ${content.description?if_exists}<br/>
-</@loopSubContentCache >
-
-
-<!-- Look for sub-topics -->
-<@loopSubContentCache subContentId=contentIdx
-    viewIndex=viewIdx
-    viewSize=viewSz
-    contentAssocTypeId="SUBSITE"
-    returnAfterPickWhen="1==1";
->
-
+    <!-- start of renderCategoryBrowse for contentId=${contentId} -->
+        
+        <#local contentIdx = contentId?if_exists />
+        <#if (!contentIdx?exists || contentIdx?length == 0)>
+            <#local contentIdx = page.contentIdx?if_exists />
+            <#if (!contentIdx?exists || contentIdx?length == 0)>
+            </#if>
+        </#if>
+        
+        <#local thisContentId=nodeTrail[indentIndex]?if_exists/>
+        
+        <#local thisNodeTrailCsv = "" />
+        <#local listUpper = (indentIndex - 1) />
+        <#if nodeTrail?size < listUpper >
+            <#local listUpper = (nodeTrail?size - 1)>
+        </#if>
+        <#list 0..listUpper as idx>
+            <#if thisNodeTrailCsv?has_content>
+                <#local thisNodeTrailCsv = thisNodeTrailCsv + ","/>
+            </#if>
+            <#local thisNodeTrailCsv = thisNodeTrailCsv + nodeTrail[idx]>
+        </#list>
+        
+        <!-- in showcontenttree, contentIdx: ${contentIdx} -->
+
+        <!-- Look for content first -->
+        <@loopSubContent contentId=contentIdx viewIndex=viewIdx viewSize=viewSz contentAssocTypeId="PUBLISH_LINK" returnAfterPickWhen="1==1">
+            <#assign dummy=Static["org.ofbiz.base.util.Debug"].logInfo("in showcontenttree, nodeTrailCsv(1):" + nodeTrailCsv, "")/>
+            <#local thisCsv=thisNodeTrailCsv + "," + subContentId />
+            <a class="tabButton" href="<@ofbizUrl>viewcontent?contentId=${subContentId?if_exists}&nodeTrailCsv=${thisCsv}</@ofbizUrl>">${uiLabelMap.CommonView}</a>  ${content.description?if_exists}<br/>
+        </@loopSubContent>
+        
+        
+        <!-- Look for sub-topics -->
+        <@loopSubContent contentId=contentIdx viewIndex=viewIdx viewSize=viewSz returnAfterPickWhen="1==1" orderBy="contentName">
             <#local plusMinus="+"/>
             <#if thisContentId == subContentId>
                 <#local plusMinus="-"/>
@@ -112,10 +100,10 @@
             <#local thisCsv=thisNodeTrailCsv />
             <#local thisCsv=thisNodeTrailCsv + "," + subContentId />
             <a class="tabButton" href="<@ofbizUrl>showcontenttree?contentId=${siteId?if_exists}&nodeTrailCsv=${thisCsv}</@ofbizUrl>" >${plusMinus}</a> &nbsp;${content.description?if_exists}
-              <a class="tabButton" href="<@ofbizUrl>searchContent?siteId=${subContentId?if_exists}&nodeTrailCsv=${thisCsv}</@ofbizUrl>" >${uiLabelMap.CommonSearch}</a> <br/>
-       <#if thisContentId == subContentId>
-         <#assign catTrail = nodeTrail + [subContentId]/>
-         <div style="padding-left:20px;"><@renderCategoryBrowse contentId=subContentId indentIndex=indentIndex + 1  nodeTrail=catTrail viewSz=viewSz viewIdx=viewIdx /></div>
-       </#if>
-</@loopSubContentCache >
+            <a class="tabButton" href="<@ofbizUrl>searchContent?siteId=${subContentId?if_exists}&nodeTrailCsv=${thisCsv}</@ofbizUrl>" >${uiLabelMap.CommonSearch}</a> <br/>
+            <#if thisContentId == subContentId>
+                <#assign catTrail = nodeTrail + [subContentId]/>
+                <div style="padding-left:20px;"><@renderCategoryBrowse contentId=subContentId indentIndex=(indentIndex + 1) nodeTrail=catTrail viewSz=viewSz viewIdx=viewIdx /></div>
+            </#if>
+        </@loopSubContent>
 </#macro>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/viewcontent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/viewcontent.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/viewcontent.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/content/viewcontent.ftl Wed Jul 30 22:03:31 2008
@@ -78,14 +78,14 @@
     </td>
     </tr>
     <#assign thisContentId = subContentId/>
-    <@loopSubContentCache subContentId=thisContentId viewIndex=0 viewSize=9999 contentAssocTypeId="RELATED_CONTENT">
+    <@loopSubContent contentId=thisContentId viewIndex=0 viewSize=9999 contentAssocTypeId="RELATED_CONTENT">
       <#assign thisNodeTrailCsv = nodeTrailCsv />
       <tr>
         <td colspan="3" align="right">
           <a class="tabButton" href="<@ofbizUrl>viewcontent?contentId=${subContentId}&amp;nodeTrailCsv=${thisNodeTrailCsv?if_exists}</@ofbizUrl>" >${content.contentName?if_exists}</a>
         </td>
       </tr>
-    </@loopSubContentCache>
+    </@loopSubContent>
 </table>
 <hr/>
 <#--

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/bloglib.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/bloglib.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/bloglib.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/bloglib.ftl Wed Jul 30 22:03:31 2008
@@ -32,14 +32,10 @@
 
 <#assign sz=0/>
 <table border="0">
-<@loopSubContentCache subContentId=contentIdx
-    viewIndex=viewIdx
-    viewSize=viewSz
-    contentAssocTypeId="PUBLISH_LINK"
+<@loopSubContent contentId=contentIdx viewIndex=viewIdx viewSize=viewSz contentAssocTypeId="PUBLISH_LINK"
     pickWhen="purposes.contains(\"ARTICLE\") && \"CTNT_PUBLISHED\".equals(content.get(\"statusId\"))"
     returnAfterPickWhen="purposes.contains(\"ARTICLE\")"
-    followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"never follow\")"
->
+    followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"never follow\")">
   <#assign thisNodeTrailCsv=nodeTrailCsv?if_exists/>
   <#assign thisSubContentId=subContentId?if_exists/>
   <#assign thisNode=globalNodeTrail?last/>
@@ -87,9 +83,11 @@
     </td>
 </@checkPermission>
   </tr>
-
 <#assign sz=listSize/>
-</@loopSubContentCache>
+
+</@loopSubContent>
+
+
 <#if sz == 0 >
   <tr><td class="tabletext" align="center">${uiLabelMap.EcommerceNoRecordsFound}</td></tr>
 </#if>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showblog.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showblog.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showblog.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showblog.ftl Wed Jul 30 22:03:31 2008
@@ -65,17 +65,16 @@
 -->
 
 <table border="0" width="100%" class="tableheadtext">
-<!-- Note that the "...When" arguments in the loopSubContentCache must be compatible with those in
+<!-- Note that the "...When" arguments in the loopSubContent must be compatible with those in
      any embedded transformSubContent, because it will assume that the first node has already
      had its conditions checked.
      It is not convenient to have the traverseSubContent check or recheck the first node
      because the associated ContentAssoc entity is not known.
 -->
         <h1>${uiLabelMap.EcommerceResponses}</h1><br/>
-<@loopSubContentCache  contentAssocTypeId="RESPONSE" subContentId=subContentId mapKey=""
+<@loopSubContent contentAssocTypeId="RESPONSE" contentId=subContentId mapKey=""
                 pickWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\") && mapKey == null"
-                followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")"
->
+                followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")">
     <@traverseSubContentCache  contentAssocTypeId="RESPONSE"
                             pickWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")"
                             followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")"
@@ -106,10 +105,10 @@
   </tr>
         </#if>
     </#if>
-     </@traverseSubContentCache >
-</@loopSubContentCache >
+     </@traverseSubContentCache>
+</@loopSubContent>
 <@wrapSubContentCache subContentId=subContentId wrapTemplateId="WRAP_NEXT_PREV" >
-</@wrapSubContentCache >
+</@wrapSubContentCache>
 </table>
 </div>
 </div>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl Wed Jul 30 22:03:31 2008
@@ -60,22 +60,20 @@
 -->
 
 <table border="0" width="100%" class="tableheadtext">
-<!-- Note that the "...When" arguments in the loopSubContentCache must be compatible with those in
+<!-- Note that the "...When" arguments in the loopSubContent must be compatible with those in
      any embedded transformSubContent, because it will assume that the first node has already
      had its conditions checked.
      It is not convenient to have the traverseSubContent check or recheck the first node
      because the associated ContentAssoc entity is not known.
 -->
         <h1>${uiLabelMap.EcommerceResponses}</h1><br/>
-<@loopSubContentCache  contentAssocTypeId="RESPONSE" subContentId=subContentId mapKey=""
+<@loopSubContent contentAssocTypeId="RESPONSE" contentId=subContentId mapKey=""
                 pickWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\") && mapKey == null"
-                followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")"
->
+                followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")">
     <@traverseSubContentCache  contentAssocTypeId="RESPONSE"
                             pickWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")"
                             followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"RESPONSE\")"
-                            wrapTemplateId=""
-                        >
+                            wrapTemplateId="">
     <#assign indentStr=indent?default("0")/>
     <#assign indent=indentStr?number/>
     <#if 1 < indent >
@@ -101,12 +99,14 @@
   </tr>
         </#if>
     </#if>
-     </@traverseSubContentCache >
-</@loopSubContentCache >
+    </@traverseSubContentCache>
+</@loopSubContent>
+
 <#--
 <@wrapSubContentCache subContentId=subContentId wrapTemplateId="WRAP_NEXT_PREV" >
 </@wrapSubContentCache >
 -->
+
 </table>
 </div>
 </div>

Modified: ofbiz/trunk/framework/webapp/config/applicationTransforms.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/config/applicationTransforms.properties?rev=681276&r1=681275&r2=681276&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/config/applicationTransforms.properties (original)
+++ ofbiz/trunk/framework/webapp/config/applicationTransforms.properties Wed Jul 30 22:03:31 2008
@@ -29,7 +29,6 @@
 injectNodeTrailCsv=org.ofbiz.content.webapp.ftl.InjectNodeTrailCsvTransform
 editRenderSubContentCache=org.ofbiz.content.webapp.ftl.EditRenderSubContentCacheTransform
 renderSubContentCache=org.ofbiz.content.webapp.ftl.RenderSubContentCacheTransform
-loopSubContentCache=org.ofbiz.content.webapp.ftl.LoopSubContentCacheTransform
 traverseSubContentCache=org.ofbiz.content.webapp.ftl.TraverseSubContentCacheTransform
 wrapSubContentCache=org.ofbiz.content.webapp.ftl.WrapSubContentCacheTransform
 limitedSubContent=org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform