Download sample application - CallingEntityMethodFromView.zip, this sample implements Java classes for EO and VO.
In EmployeesImpl.java, implementation class for EO, I have created simple custom method - calculateEmployeeRate(). This method multiplies salary with commission value per row:
Then you need to create VO and VO row implementation classes:
Create method in VO implementation class. This method should accept a row, based on this row it will retrieve EO implementation class and invoke custom method available there:
In order to make it work from ViewController, expose method you just created in VO implementation class through Client Interface:
Any exposed method can be declared in Page Definition. Pay attention for parameter value, I specified to accept current row. This means method in VO implementation always will get current row and based on it will invoke my custom method in EO:
On runtime, press Calculate Rate button that invokes custom logic in Model, and you will get result: