|
Author: bibryam
Date: Fri Dec 18 14:48:33 2009 New Revision: 892264 URL: http://svn.apache.org/viewvc?rev=892264&view=rev Log: When a form has paginate="false" render all the rows by setting a big viewSize internally. Modified: ofbiz/trunk/applications/accounting/widget/GlForms.xml ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java Modified: ofbiz/trunk/applications/accounting/widget/GlForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlForms.xml?rev=892264&r1=892263&r2=892264&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlForms.xml Fri Dec 18 14:48:33 2009 @@ -1016,7 +1016,7 @@ <field name="amount"><display type="currency" currency="${currencyUomId}"/></field> </form> - <form name="AcctgTransEntriesSearchResultsCsv" type="list" title="List Accounting Transaction Entries" list-name="acctgTransEntryList" view-size="1000"> + <form name="AcctgTransEntriesSearchResultsCsv" type="list" title="List Accounting Transaction Entries" list-name="acctgTransEntryList" paginate="false"> <actions> <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransEntryList"> <condition-list> @@ -1059,7 +1059,7 @@ <field name="amount"><display/></field> </form> - <form name="AcctgTransSearchResultsCsv" type="list" title="List Accounting Transactions" list-name="acctgTransList" view-size="1000"> + <form name="AcctgTransSearchResultsCsv" type="list" title="List Accounting Transactions" list-name="acctgTransList" paginate="false"> <actions> <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransList" result-set-type="forward" distinct="true"> <condition-list> Modified: ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml?rev=892264&r1=892263&r2=892264&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml Fri Dec 18 14:48:33 2009 @@ -65,7 +65,7 @@ <field name="submitButton" title="${uiLabelMap.AccountingCreateAssignment}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> - <form name="ListGlAccount" list-name="listIt" target="" title="" type="list" default-entity-name="GlAccount" + <form name="ListGlAccount" list-name="listIt" target="" title="" type="list" default-entity-name="GlAccount" paginate="false" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <actions> <set field="entityName" value="GlAccount"/> Modified: ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml?rev=892264&r1=892263&r2=892264&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsScreens.xml Fri Dec 18 14:48:33 2009 @@ -248,8 +248,6 @@ <actions> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> <set field="titleProperty" value="PageTitleListAccounts"/> - <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/> - <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="1000"/> <set field="pageLayoutName" value="simple-landscape"/> </actions> <widgets> 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=892264&r1=892263&r2=892264&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 Fri Dec 18 14:48:33 2009 @@ -174,6 +174,7 @@ /** Pagination settings and defaults. */ public static int DEFAULT_PAGE_SIZE = 10; + public static int MAX_PAGE_SIZE = 10000; protected int defaultViewSize = DEFAULT_PAGE_SIZE; public static String DEFAULT_PAG_INDEX_FIELD = "viewIndex"; public static String DEFAULT_PAG_SIZE_FIELD = "viewSize"; @@ -1310,10 +1311,8 @@ Iterator<?> iter = null; if (obj instanceof Iterator) { iter = (Iterator<?>) obj; - setPaginate(true); } else if (obj instanceof List) { iter = ((List<?>) obj).listIterator(); - setPaginate(true); } // set low and high index @@ -1375,10 +1374,8 @@ Iterator<?> iter = null; if (obj instanceof Iterator) { iter = (Iterator<?>) obj; - setPaginate(true); } else if (obj instanceof List) { iter = ((List<?>) obj).listIterator(); - setPaginate(true); } // set low and high index @@ -2507,9 +2504,9 @@ highIndex = (viewIndex + 1) * viewSize; } else { viewIndex = 0; - viewSize = defaultViewSize; + viewSize = MAX_PAGE_SIZE; lowIndex = 0; - highIndex = defaultViewSize; + highIndex = MAX_PAGE_SIZE; } context.put("listSize", Integer.valueOf(listSize)); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java?rev=892264&r1=892263&r2=892264&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java Fri Dec 18 14:48:33 2009 @@ -62,6 +62,7 @@ protected boolean paginate = true; public static int DEFAULT_PAGE_SIZE = 5; + public static int MAX_PAGE_SIZE = 10000; protected int viewIndex = 0; protected int viewSize = DEFAULT_PAGE_SIZE; protected int lowIndex = -1; @@ -274,9 +275,9 @@ highIndex = (viewIndex + 1) * viewSize; } else { viewIndex = 0; - viewSize = DEFAULT_PAGE_SIZE; + viewSize = MAX_PAGE_SIZE; lowIndex = 0; - highIndex = DEFAULT_PAGE_SIZE; + highIndex = MAX_PAGE_SIZE; } } |
| Free forum by Nabble | Edit this page |
