Screen scaffolding: Special Filter/Find Controls

From OpenPetra Wiki
Revision as of 19:58, 12 August 2013 by Alanjfpaterson (talk | contribs) (Created page with '== This Page is still Work In Progress == Alan is still updating this page == Overview == A Filter/Find panel is part of many of the screens in Open Petra. It is a user control …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This Page is still Work In Progress

Alan is still updating this page

Overview

A Filter/Find panel is part of many of the screens in Open Petra. It is a user control that is docked to the left of the screen beside the Grid that shows the data table content. The user control contains all the base functionality of creating its content and responding to user events. You configure the content of the user control by means of the YAML file for the screen. In many cases there will be no need for any manual code because all the code for Filter/Find can be auto-generated. However if you need to handle additional events or construct special controls, some manual code will be necessary.

The Filter/Find panel consists of one or two tabs - a Filter tab and/or a Find tab. You can have both or one without the other. The Filter tab allows the user to filter the rows in the grid by some combination of column values. The Find tab allows the user to skip from one row to the next that matches a given set of one or more column values. The Find tab is simpler to describe because it has fewer features than the Filter tab.

The Filter/Find panel is normally initially hidden by virtue of being collapsed to zero-width on the left side of the grid. Furthermore the controls on the panel are dynamically created the first time that the panel is shown. So there is no time penalty in terms of loading a screen that has a Filter/Find panel. When the user clicks the Filter button on the Buttons panel the user control is displayed for the first time. Likewise the panel can be collapsed by clicking the Filter button again or by clicking on the close box of the panel itself. This typical behaviour can be over-ridden by specifying that the panel is to be shown as soon as the screen loads.

Normally when the panel is collapsed (hidden) the filter is not applied - in other words when the filter button is clicked to close the panel the grid reverts to showing all rows. However this behaviour can be over-ridden as well so that the filter remains active when the panel is hidden.

The Filter panel can have one or two sets of column filter controls. This permits the developer to configure one set to be always on and the other set to be on when the panel is shown and off when the panel is hidden. The first set is referred to as the standard filter and the second set as the extra filter. The most common implementations will not need an extra filter.