svn commit: r655606 - in /ofbiz/trunk/framework/widget: config/widget.properties src/org/ofbiz/widget/form/ModelForm.java

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

svn commit: r655606 - in /ofbiz/trunk/framework/widget: config/widget.properties src/org/ofbiz/widget/form/ModelForm.java

adrianc
Author: adrianc
Date: Mon May 12 12:13:00 2008
New Revision: 655606

URL: http://svn.apache.org/viewvc?rev=655606&view=rev
Log:
Might as well make the default view size configurable.

Modified:
    ofbiz/trunk/framework/widget/config/widget.properties
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java

Modified: ofbiz/trunk/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/config/widget.properties?rev=655606&r1=655605&r2=655606&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/config/widget.properties (original)
+++ ofbiz/trunk/framework/widget/config/widget.properties Mon May 12 12:13:00 2008
@@ -23,3 +23,5 @@
 # Enable screen widget boundary comments
 widget.verbose=true
 
+# Default number of items to be displayed per page in a list form
+widget.form.defaultViewSize=10

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=655606&r1=655605&r2=655606&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Mon May 12 12:13:00 2008
@@ -39,6 +39,7 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.base.util.collections.FlexibleMapAccessor;
@@ -426,6 +427,7 @@
             if (rowSubmit != null && rowSubmit.equalsIgnoreCase("true"))
                 useRowSubmit = true;
         }
+        setDefaultViewSize(UtilProperties.getPropertyValue("widget.properties", "widget.form.defaultViewSize"));
         if (formElement.hasAttribute("view-size")) {
             setDefaultViewSize(formElement.getAttribute("view-size"));
         }