GUI Toolkit Ideas

From WeBWorK_wiki
Revision as of 16:28, 20 February 2008 by Sam (talk | contribs) (New page: Class for generating data tables. You tell it which fields to show, which to make editable, which records to show, whether to allow record selection, whether to allow changes to shown set ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Class for generating data tables. You tell it which fields to show, which to make editable, which records to show, whether to allow record selection, whether to allow changes to shown set (show all, show selected), whether to show add/remove controls, etc. It generates the correct HTML code. On the next invocation, you pass the request to it and it deals with the results and returns the modified table.

Requirements

Options

  • which fields to show (allow table joins?)
  • which fields to make editable (if any, show "save changes" button)
  • which records to show ("where clause")
  • whether to allow record selection (none, one, many)
  • whether to allow changes to the shown set (show all, show selected, etc.)
  • whether to show controls to add or remove records
  • any custom controls to show

Issues

If we want this now, it's got to interface with the current database system, i.e. it has to be a "user" of DB.pm. This means limitations:

  • can only join tables that have a 1-to-1 relationship and have the same key fields.
  • the "where clause" is limited to things we can pass to DB.pm, like lists of keyparts.