Modifying the populate method

Before using your new data bean, you must ensure that you populate the bean with its required data in the populate method. This data may include data from the database and input parameters upon instantiation.

About this task

In following example the UserResDataBean is populated with data from the database using the refreshCopyHelper method:

Procedure

  1. Expand the UserResDataBean data bean to view its fields and methods.
  2. In the Outline view, select the populate() method to view its source code. It initially appears as follows:
    
    public void populate () throws Exception {}
    
  3. Modify the source code so the method appears as follows:
    
    try {
            super.refreshCopyHelper();
    } 
    catch (javax.ejb.FinderException e) {
            throw new
    ECSystemException(ECMessage._ERR_CREATE_EXCEPTION,
            "UserResDataBean", "populate");
    
  4. Save your changes.