JeeWiz Home  
The Model-Driven System Builder
JeeWiz Modeler's Help File for RSA/RSM
 
Contents  >   5.  User Interfaces
 


5.3 How to Model a Basic Page

An unstyled, basic page allows information to be displayed and entered primarily for a single dataview record. Most update pages are basic pages.

If the dataview is backed by an initial entity, you can access records held in the database table fronted by the entity through functionality built into the transform. Connections to related dataviews (also backed by an entity) will normally allow you to connect to rows based on the relation, but not edit information on the individual fields directly. An exception is a contained relationship. The displayStyle on a dataview end decides how the connections are handled, and which displayStyles are supported depend on the multiplicity. If no displayStyle is defined, the relationship will not be shown.

to-one relationships:
containedshows all the fields of the related dataview as though they were part of the primary dataview. Mostly used on a one-to-one.
dropdownshows the summary fields for each possible row as a selectable dropdown. Should only be used to connect to a table which won't have too many rows in it.
lookupshows the summary fields as readonly individual fields. A button is provided taking the user to a search screen. When the relevant row is found the return to the original screen will populated the summary fields with the linked data.

to-many relationships:
gridshows the summary fields of all the related rows in grid form. Two links appear on each row for edit and deletion, which take the operator to the relevant screen (by default these are the same maintenance update screen, which provides both facilities). A button near the top of the grid takes the user to a blank creation screen. If there are no related rows, the grid does not appear.
displaygridAs grid but without the buttons.
assocgridA grid of all possible rows in the connecting table, with a checkbox at the end of each row to show/edit whether it is connected to the primary row. Should only be used to connect to a table which won't have too many rows in it.
selectgridA grid of related rows, with a selection button at the end of each row, which connects to a select event.
multidropdownshows the summary fields for each possible row as a selectable dropdown. More than one row can be selected. Should only be used to connect to a table which won't have too many rows in it.
owningdropdownShows the summary fields of all related rows as a multidropdown, but those selected don't alter the relationships. This is used for processing subsets in code.

It's worth noting that there are no to-many relationships designed for use with a large number of fields. For this a subsidiary styled page, (list or listadd) should be used.

Most of this functionality is available even if the dataview is not backed by an initial entity. Anything which involves links to other pages with database functionality such as lookup, will not work, but the basic display and edit functionality will. The main differences being that the data will have to be prepared for the page by explicitly written code, and any changes will have to be persisted in the database also by explicitly written code.

You may want to model database access this way, because the information to be persisted is in a very different format to that collected on the page. You have to keep in mind the different needs of the users ease of use and the database you are storing information in. If you are using a legacy system, the latter may be beyond your control. If so it is necessary to provide the hooks for the application programmer on the events.


Links:  

Copyright © 2001-2006 New Technology / enterprise Ltd.