# Definition of dynamic models using XML descriptors
Definition of dynamic models using XML descriptors
# Introduction
It is possible to define the underlying data model without having to write java code. To do this, you must use an XML descriptor which describes the DataNodes and their relationships. An skeleton XML descriptor has the following structure:
```XML
**Variable** | **Value** |
---|---|
self | Current DataNode |
instance | Business object wrapped into current DataNode |
parent | Parent DataNode |
parent.instance | Business object wrapped into parent DataNode |
datasource | DataSoruce the current DataNode belongs to |
**Attribute** | **Usage** |
---|---|
jndi | JNDI path to EJB Home interface |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Variable** | **Value** |
---|---|
self | Current DataNode |
instance | Business object wrapped into current DataNode |
parent | Parent DataNode |
parent.instance | Business object wrapped into parent DataNode |
datasource | DataSoruce the current DataNode belongs to |
**Attribute** | **Usage** |
---|---|
collection | EL expression that identifies the collection onto which the business object must be added or removed |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
className | Name of the java class to be used |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
expr | EL expression pointing to the attribute to validate |
friendlyName | Text to be presented to the user on validation failure. If there is a ZK label with this text, it will be localized based on current user language preference. |
notNull | true is the attribute is mandatory |
maxLength | Maximum length of the attribute |
minValue | Minimum value in case of numeric attributes |
maxValue | Maximum value in case of numeric attributes |
**Attribute** | **Usage** |
---|---|
jndi | JNDI path to EJB Home interface |
method | EJB Bean method to get business objects |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
collection | EL expression that contains the objects collection |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
className | Name of the FinderHandler class |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
**Attribute** | **Usage** |
---|---|
className | Name of the business object class |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
bean-attribute/name | Name of the attribute |
bean-attribute/value | EL expression with the value to assign |
Attribute | Usage |
---|---|
name | Name of the virtual attribute |
expr | EL expression that evaluates de attribute value |
if | EL expression that must be evaluated to true prior to handler action |
unless | EL expression that must be evaluated to false prior to handler action |
depends | XPath to a attribute or business object the expression depends on |
**Attribute** | **Usage** |
---|---|
id | ZK Identifier |
className | root DataNode class name |
src | XML resource name for XML dynamic data model |
rootNode | Root node type for dynamic data model |