Evolutility.org 4.1

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. The sub-entity (or detail) 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"

Column (in the master table) used to join with the details table.

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.