Consuming sMash/Project-Zero services from EGL Rich UI
ChrisLaffra 060000KCEQ Visits (1085)
In another post, I explain how to install project zero/sMash into RBD 7.5.1. In this post, I will describe a Rich UI application that consumes a set of REST services offered by the zero.employee.demo example that comes with sMash.
The end result application is here:
The sample consists of an editable grid (a grid with inline editors, written entirely in EGL). To load and update the employees from project zero, I borrowed the concept of a RestStore offered in sMash. The RestStore offers a simplified API to the REST put/
You will notice that while you are editing the contents in the grid, that the EditableGrid keeps track of all the changes that are made to its contents. The EmployeeDemo listens to these changes, and updates the UI to indicate them. Later on, when the user decides so, the changes can be uploaded to the server in bulk. It is this ability of EGL Rich UI to maintain state inside the client that allows for highly interactive, rich applications. It is very difficult, if not impractical to do this in, say, JSF.
See the attached project interchange for the sample code, the EditableGrid, and the RestStore.