We can define method inside Application Moduel Impl class for funtionality which is using multiple viewobjects and ViewObject Impl class is used for functionality specific to a particular Viewobject.
ViewObject Impl and RowImpl:
- We have two java clases for each view object
- Impl java class can contain method to either delete a row from this view object e.g.
public void deleteEmployee() {
Row currentRow = this.getCurrentRow();
if (currentRow != null) {
currentRow.remove();
this.getDBTransaction().commit();
}
}
Now you need to expose this method to client interfcae (This is present in Viewobject-> Java->ClientInterface\
- Now in your jspx/jsf page definition insert bindings methodAction, select Employees Viewobject and this mehthod will be available in operations.
- Now to invoke this method you can either call it on mehtod click in ActionListener give this value #{bindings.deleteEmployee.execute}