HTML5 Search View
This generator helps you create a standard
HTML5 SPA search view that consists of a search
criteria panel and a results grid under it, as well as a corresponding view
controller. The form will be based on a single operation
defined in the model that may take search criteria as an input structure and that
outputs a list of rows. Both the row and criteria structures must be configured
in the object model to be parts of corresponding Xomega Framework data objects,
which the generated form will use as a data model to bind the controls to. The data
object for the list row must be specified in the generator's configuration (see
the List Row Object parameter), which will automatically identify the operation
in the object model.
Here is a summary of the features in the generated search form.
- View Model binding - the generated HTML controls on the form will be automatically bound
to the corresponding properties of the underlying generated TypeScript XomegaJS data objects
- Routing - navigation to the form is handled by the generated
view controller using Durandal framework. The view controller will be TypeScript
class that is reponsible for handling any navigation and user events and will
contain XomegaJS data objects as its members.
- Saved Searches - The user or another view will be able to
invoke this search view with specific criteria prepopulate that it will pass in
the URL. The user can populate the criteria and click on PermaLink link to get
them in the URL. That way this URL can be bookmared and invoked at a later point
to quickly pull the necessary search results. Aslo, another view, such as a
summary screen, can allow drilling down to view details by invoking this view
with certain criteria in the URL.
- Criteria Summary - a summary of selected search criteria is
displayed above the grid to clearly show the criteria that the current results
are based on.
- Paging - the default HTML grid will have a pager with
configurable page size. It will also show the total number of records returned
and which of those records are currently displayed on the screen.
This generator can be rerunnable during initial prototyping phase to allow quickly
visualizing the object model. However, you will eventually want to edit the generated code manually to remove
columns or fields that should not be displayed and perhaps add other controls or
rearrange the controls on the form. At this point you may want to rename the generated
files, so that the generator doesn't accidentally override them or delete them during
the cleanup operation. This is why it is recommended to make the generated files
start with an underscore to distinguish them from non-generated files.
Below is a sample form that was generated by this generator.generator.