Skip to main content

Getting Started with Account List in WebUI

Getting Started with Account List in WebUI

The Account List in the WebUI allows users to view a list of accounts associated with a particular customer. It retrieves account data from the backend using RESTful API calls and displays it in a user-friendly format. The Account List includes details such as account number, account type, available balance, actual balance, interest rate, overdraft limit, and statement dates. Users can filter the list based on various criteria like account number, customer number, and available balance. The data is fetched and processed by the AccountList class, which handles the retrieval and formatting of account information.

Why and How to Use Account List

The Account List in the WebUI is a feature that allows users to view a list of accounts associated with a particular customer. It retrieves account data from the backend using RESTful API calls and displays it in a user-friendly format. The Account List includes details such as account number, account type, available balance, actual balance, interest rate, overdraft limit, and statement dates. Users can filter the list based on various criteria like account number, customer number, and available balance. The data is fetched and processed by the AccountList class, which handles the retrieval and formatting of account information.

Where Account List is Used

The Account List is used in the Customer Services Interface and the Liberty UI.

Usage Example

To display the accounts for a particular customer, click on 'List accounts belonging to customer'.

Main Functions

There are several main functions in this folder. Some of them are getCount, howMany, doGet, getAccount, and size. We will dive a little into getCount, howMany, and doGet.


getCount

The getCount function returns the count of accounts based on a filter. If the list of accounts is empty, it calls the howMany function to determine the count.

	public int getCount(String filter)
{
if (this.listOfAccounts.isEmpty())
{
howMany(filter);
}
return this.count;
}


howMany

The howMany function calculates the number of accounts that match a given filter. It interacts with the AccountsResource to fetch account data and updates the count accordingly.

	public int howMany(String filter)
{

// AND ACCOUNT_NUMBER = 0000000024
// AND ACCOUNT_CUSTOMER_NUMBER

AccountsResource myAccountsResource = new AccountsResource();
Response myAccountsResponse = null;
this.count = 0;

try
{
if (filter.contains("AND ACCOUNT_AVAILABLE_BALANCE"))
{
// 01234567890123456789012345678901234567890
// AND ACCOUNT_AVAILABLE_BALANCE <= 33558.0

String operator = filter.substring(31, 32);
BigDecimal balance = BigDecimal
.valueOf(Double.parseDouble(filter.substring(34)));


doGet

The doGet function retrieves account data based on various filters and limits. It clears the current list of accounts, fetches new data from the AccountsResource, and updates the list of accounts.

	public void doGet(int limit, int offset, String filter) throws IOException
{

AccountsResource myAccountsResource = new AccountsResource();

Response myAccountsResponse = null;
String myAccountsString = null;
JSONObject myAccountsJSON = null;

try
{

if (filter.contains(" AND ACCOUNT_AVAILABLE_BALANCE"))
{
this.listOfAccounts.clear();
String operator = filter.substring(31, 32);
BigDecimal balance = BigDecimal
.valueOf(Double.parseDouble(filter.substring(34)));

myAccountsResponse = myAccountsResource
.getAccountsByBalanceWithOffsetAndLimitExternal(balance,

 

This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human