I've now completed several major steps in the GUI for filters:
- First, I rationalized and streamlined the record list display controls at the top, separating the hidden form which keeps recordlist settings from a new, anonymous form which contains the controls for navigation (paging, row and column display totals, etc.). This enabled me to place another copy of the navigation controls at the bottom of the page, which is another convenience.
- I've decided to place the filter controls inside the table header row, obviating the need for them to have labels (since the header row already has the field name in it). I have three drop-down filter controls displaying themselves already (the three fields which are
MdhStrSelectField
objects). - I've added a
Filter
button to the final column of the header row of the table (the Actions column, whose header already contains the "New record" button). This Filter button actually just calls the genericnavigateList
function with the current settings. That's the same function called by the other navigation controls, but it will have the effect of applying any filter changes because the filter control settings will be read during thenavigateList
function and sent back to the server, to be handled byMdhRecordList
. I don't want to use anonchange
event on the filter controls themselves, because the user will probably want to make several filter setting changes before applying them (and some will ultimately be text boxes). - I had to wrap the filter controls in a
<form>
element, but I couldn't wrap the whole table in a form, because other editing forms are often inserted into the middle of the table by the editing code; I needed to wrap only the header row. If I enclose the<tr>
element in a<form>
element, though, the display blows up, and the XHTML would be invalid anyway, so I had to include a separate little form inside each table header cell to wrap its control. Annoying, but it works.