Evolutility.org 4.1

Meta-model optional elements

Beside the required elements form, data, panel, and field, the additional optional elements panel-details, queries and query, and tab can be used to add functionalities like master-details, cross-references lists, predefined queries, or more page structure.

These elements are supported by Evolutility using XML but not yet by Evolutility Dictionary.

panel-details element

The element panel-details allows for nested sub-entities within the driving entities. In other words, it allows for hierarchical data and adds the feature of master-details or cross-reference. The sub-entity can be edited within the page as a grid, or by linking to another page using the sub-entity as its driving entity.

The screenshot below shows an order. The master is composed of 3 panels, one panel-details and another panel for the total.

The corresponding XML is as follow:

<form label="Orders" xmlns="http://www.evolutility.com" >
<data dbtable="NW_ORDERS" dborder="t.OrderDate desc"
entity="order" entities="orders" />
<panel label="Order" width="100">
<field label="Order ID" ... />
<field label="Customer" ... />
<panel-details panelid="1" label="Order Details" width="100"
dborder="t.Productname" >
<field label="Product" ... />
<field label="Unit price" ... />
<panel label="" width="84" cssclass="none"></panel>  
<panel label="" width="16"> 
<field label="Total Price" ... />   

Each panel-detail element contains one or more field elements which are displayed as a grid when in edit mode.

The element panel-details use the same attributes as panel (label, cssclass, cssclasstitle, img, optional, width) plus the following extra attributes:

Key column (in the details table) used to join it to the master table.
In the sample XML above, with dbtable=NW_ORDERS, dbtabledetails= NW_OrderDetails, dbcolumndetails="OrderID", the where clause for the query of the details rows would be "NW_ORDERS.ID= NW_OrderDetails.OrderID"

Maximum number of rows displayed.

Name the driving table for the details.

Each panel-details must have this attribute (set to an integer value) and each field inside that must also have it (with the same matching value). Please look at the Wine cellar sample application as an example of how it works.

Notes: A field element nested in a panel-details only requires a subset of the attributes of a field nested in a panel.

queries and query elements

It is possible to add canned queries as a "Selections" button on the toolbar.

<queries label="Selections of restaurants">
<query label="Restaurant in San Francisco" dbwhere="t.City = 'san francisco'" url="sfo" />
<query label="Asian food" dbwhere=" t.categoryID IN (3,4,5,6,7,11,12)" url="asian" />

A queries contains several query. The queries element uses the following two optional attributes:

Footer text displayed below the list of queries.

Introduction text displayed above the list of queries.

Attributes of query are as follow:

SQL Where clause for the query.

Query title.

Key used to identity each query within the list. Each key can be used in links within the page to force the control to display the corresponding query. Example:

<a href="javascript:__doPostBack('evo1','q:sfo')">Restaurants in San Francisco</a>

Note: In addition to specifying queries and query in the metadata, the Web control property DBAllowSelections must be set to True.

tab element

Tabs are used to divide a page into several sets of panels and panel-details displayed separately. A tab contains one or more panels and panel-details.

Using tab elements adds one level of hierarchy in the metadata documents. The structure becomes the following: one form element containing one data element, and several tab elements containing one or more panel elements containing one or more field elements.

Here is an example from our demo, the first few lines of the wine cellar XML:

<form xmlns="http://www.evolutility.com">
<data ... />
<tab label="General" >
  < panel label="Wine" width="80" >
   <field label="Name" type="text" ...  width="62" />
    <field label="Vintage" type ="integer" ... width="38" />
  <panel label="Bottle Label" width="20">
    <field type="image" ... />
<tab label="Purchase" >
  <panel label="Purchase" width="30" >
    <field type="date" ... />

The attributes of the element tab are the same as for the element panel.