Tuesday, June 19, 2018

How to get the TableBuffer from a class of a form in Pre/Post Event handler with chain of command

1. Create an extension class of the parent class

final public class AMRenatTablePost_Extension
    public List                RentList;
    public void initFromArgs(Args args)
        Next initFromArgs(args);

    public List parmRentalList(List _RentalList = RentList)
        RentList = _RentalList;
        return RentList;


2. Add that method name where they are getting the table buffer with Next command.
3. Create a parm method in that extension class to get the buffer.
4. In this example we are getting the table buffer in list, else it may be in any format..
5. Create a Pre/Post eventhandler  class to a method of parent table.
6. Get the class buffer like AMRentTablePost                 AMRentTablePost = args.getThis(); 
7. AMRentTable                 localRentTable,amRentTable;
     rentalList                         = AMRentTablePost.parmRentalList();//Add the new parm method of that extensions class
     ListEnumerator               rentals = rentalList.getEnumerator();     
     while (rentals.moveNext())
            amRentTable = rentals.current();// Table buffer from the list

No comments:

Post a Comment