Difference between revisions of "Opentaps Ajax Pagination Framework"

From Opentaps Wiki
Jump to navigationJump to search
m (Protected "Opentaps Ajax Pagination Framework": Sysop page [edit=sysop:move=sysop])
Line 18: Line 18:
 
</nowiki>
 
</nowiki>
 
These are no longer needed because they were used to control the pagination of the list of GL accounts from the server side, but the opentaps Ajax pagination form macro allows the user to set pagination choices.
 
These are no longer needed because they were used to control the pagination of the list of GL accounts from the server side, but the opentaps Ajax pagination form macro allows the user to set pagination choices.
 +
 +
The second step is to set up the pagination list builder on the server side.

Revision as of 22:52, 28 August 2007

In this guide, we will show you how to replace a static form-widget list form with an Ajax paginated form using the opentaps Form Macros pagination framework.

The screen is the Financials > Configure >> Chart of Accounts screen and displays all the general ledger accounts configured for a company. Originally, the list of accounts was created with the ofbiz form widget, but because a company typically has several hundred accounts associated with it, such a static form was not very user-friendly. It always displayed 100 GL accounts per page, and paging through was slow.

The first step is to edit screen widget XML definition and remove the references to the form widget. Edit the file hot-deploy/financials/widget/financials/screens/ConfigurationScreens.xml and look for the screen "listGlAccounts". You can remove the following lines which referenced the old form widget :

<container style="screenlet-body"> <include-form name="listGlAccounts" location="component://financials/widget/financials/forms/configuration/ConfigurationForms.xml"/> </container>

You can also remove the lines:

<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="100"/> These are no longer needed because they were used to control the pagination of the list of GL accounts from the server side, but the opentaps Ajax pagination form macro allows the user to set pagination choices.

The second step is to set up the pagination list builder on the server side.