Posts

Showing posts from September, 2018

Reset ExecuteWithParams - a different approach

Image
This blog speaks about a quick and efficient way to clear a form based on a View-Criteria, which is exposed on the GUI as an ADF form field.
The setup is simple enough.
1. Create a ViewObject - EmployeesVO, based on the EMPLOYEES table of HR schema. 2. Create a ViewCriteria - EmployeeSearchCriteria, with criteria of your choice. 3. Shuttle the ViewCriteria onto the View Object's Application Module instance. 4. Drag and drop the ExecuteWithParams action on the GUI as an ADF form. 5. Add two buttons - Search and Reset.
Here's how it stands now:


And this is how the GUI looks:

The "Search" button calls the ExecuteWithParams action. Nothing exciting there.
But how do we reset the form? One crude way is to just get hold of each attribute binding, and setting them to NULL. But what if your View-Criteria has many attributes to search on? It becomes really tedious to individually set each attribute to null.
Here is where the ADF BC comes to our rescue.
The ViewCriteria class…