svn commit: r745890 - in /ofbiz/trunk: applications/content/src/org/ofbiz/content/webapp/ftl/ applications/content/webapp/content/WEB-INF/actions/cms/ framework/webtools/src/org/ofbiz/webtools/

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

svn commit: r745890 - in /ofbiz/trunk: applications/content/src/org/ofbiz/content/webapp/ftl/ applications/content/webapp/content/WEB-INF/actions/cms/ framework/webtools/src/org/ofbiz/webtools/

jleroux@apache.org
Author: jleroux
Date: Thu Feb 19 14:59:58 2009
New Revision: 745890

URL: http://svn.apache.org/viewvc?rev=745890&view=rev
Log:
Fix some bugs and misc. (not sure about functionalities, at least now it does not hang)

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/MostRecentPrep.groovy
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/UserPermPrep.groovy
    ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java

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=745890&r1=745889&r2=745890&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 Thu Feb 19 14:59:58 2009
@@ -74,7 +74,9 @@
         Integer idx = (Integer) ctx.get("entityIndex");
         if (idx == null) idx = Integer.valueOf(0);
         int i = idx.intValue();
-        if (i >= lst.size()) {
+        if (UtilValidate.isEmpty(lst)) {
+            return false;
+        } else  if (i >= lst.size()) {
             return false;
         }
         GenericValue subContentDataResourceView = (GenericValue) lst.get(i);
@@ -195,8 +197,6 @@
             }
 
             public int afterBody() throws TemplateModelException, IOException {
-                Integer idx = (Integer) templateCtx.get("entityIndex");
-                int i = idx.intValue();
                 boolean inProgress = prepCtx(delegator, templateCtx);
                 if (inProgress) {
                     return TransformControl.REPEAT_EVALUATION;

Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/MostRecentPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/MostRecentPrep.groovy?rev=745890&r1=745889&r2=745890&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/MostRecentPrep.groovy (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/MostRecentPrep.groovy Thu Feb 19 14:59:58 2009
@@ -17,44 +17,12 @@
  * under the License.
  */
 
-/*
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import org.ofbiz.base.util.*;
-import org.ofbiz.entity.*;
-import org.ofbiz.security.*;
-import org.ofbiz.service.*;
-import org.ofbiz.entity.model.*;
-import org.ofbiz.widget.html.*;
-import org.ofbiz.widget.form.*;
-import org.ofbiz.securityext.login.*;
-import org.ofbiz.common.*;
-import org.ofbiz.entity.model.*;
-
-import org.ofbiz.widget.html.HtmlMenuWrapper;
-import org.ofbiz.widget.WidgetWorker;
-import org.ofbiz.entity.condition.EntityConditionList;
-import org.ofbiz.entity.condition.EntityExpr;
-import org.ofbiz.entity.condition.EntityOperator;
-
-import freemarker.template.SimpleHash;
-import freemarker.template.SimpleSequence;
-
-import javax.servlet.*;
-import javax.servlet.http.*;
-*/
-
 import org.ofbiz.base.util.*
 import org.ofbiz.entity.util.*
 import org.ofbiz.content.ContentManagementWorker;
 import org.ofbiz.content.content.ContentWorker;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityOperator;
 
 Debug.logInfo("in mostrecentprep(1):","");
 paramMap = UtilHttp.getParameterMap(request);

Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/UserPermPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/UserPermPrep.groovy?rev=745890&r1=745889&r2=745890&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/UserPermPrep.groovy (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/cms/UserPermPrep.groovy Thu Feb 19 14:59:58 2009
@@ -27,7 +27,7 @@
 
 if (forumId) {
     siteRoleMap = [:];
-    for (int i=0; i < blogRoles.size; i++) {
+    for (int i=0; i < blogRoles.size(); i++) {
         roleType = blogRoles.get(i);
         roleTypeId = roleType.roleTypeId;
         contentRoleList = delegator.findList("ContentRole", EntityCondition.makeCondition([contentId : forumId, roleTypeId : roleTypeId]), null, null, null, false);

Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=745890&r1=745889&r2=745890&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Thu Feb 19 14:59:58 2009
@@ -33,11 +33,8 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.text.NumberFormat;
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -65,11 +62,6 @@
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
-import org.ofbiz.entity.condition.EntityCondition;
-import org.ofbiz.entity.condition.EntityConditionList;
-import org.ofbiz.entity.condition.EntityExpr;
-import org.ofbiz.entity.condition.EntityFunction;
-import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.model.ModelField;
 import org.ofbiz.entity.model.ModelFieldType;
@@ -81,7 +73,6 @@
 import org.ofbiz.entity.model.ModelViewEntity;
 import org.ofbiz.entity.util.EntityDataAssert;
 import org.ofbiz.entity.util.EntityDataLoader;
-import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntitySaxReader;
 import org.ofbiz.entityext.EntityGroupUtil;