General
Introduction
The forms enable the user to inspect, create, or edit data. While the Workflow-XML mainly defines the logical structure of the HTML-Workflow, the Form-XML defines the user-interaction through the GUI-definition.
The validation of the user input is done on two sides. Validation of the user input in FormFields can be handled through client-side scripting (for example, JavaScript), which can be done for a certain FormField when focus is lost. But the user-input is also always validated at the server-side.
The definition of all forms occurs by using an XML-File, which should be stored at the following path:
..\Workflows\FormSettings
As an example we create a "MyNewProject.xml" in this directory.
Relation between the distinct hierarchical layers
FormList
Root element of the Form-XML has to appear only once.
Child element | Cardinality |
---|---|
Include | 0 .. n |
Form | 0 .. n |
Include
Container element for the inclusion of external Form-XML files.
Form
Element used for the creation of a form.
Child element | Cardinality |
---|---|
FormAction | 0 .. n |
FormFilter | 0 .. n |
FormTab | 1 .. n |
FormFilter
Element used to specify the FormFilter for the List-Controller.
FormTab
Element used for the generation of a tabulator in a form.
Child element | Cardinality |
---|---|
FormGroup | 1 .. n |
FormAction | 0 .. n |
FormGroup
Element used for the grouping of FormFields inside the form.
Child element | Cardinality |
---|---|
FormAction | 0 .. n |
FormField | 1 .. n |
FormFile | 0 .. n |
FormSingleRow | 0 .. n |
FormTable | 0 .. n |
FormFile
Element used for the generation of File-upload-UI and File-download-UI in a form.
FormSingleRow
Element used to display multiple FormField's in one row.
Child element | Cardinality |
---|---|
FormField | 1 .. n |
FormField
Element representing a data field in a form.
Child element | Cardinality |
---|---|
FormAction | 0 .. n |
FormTable
Element used for the visualization of a table within a form.
Child element | Cardinality |
---|---|
FormAction | 0 .. n |
FormTableField | 1 .. n |
FormTableField
Element representing a column in a FormTable.
FormAction
Element representing an action (= button) in a Form.
Child element | Cardinality |
---|---|
Param | 0 .. n |
Param
Element used for the definition of additional FormAction parameters.
Example for FormSettings.xml
<?xml version="1.0" encoding="utf-8"?>
<FormList>
<Form name="RPI_PUBLISHORDER" table="RPI_PUBLISHORDER" idfield="ID" pagesize="20" order="PUBLISHSTARTDATE DESC">
<FormTab name="RPI_PUBLISHORDER_Tab">
<FormGroup name="RPI_PUBLISHORDER_Group">
<FormField name="ID" label="Publishorder ID:" type="textfield" datatype="guidstring" required="false" visible="hidden"/>
<FormSingleRow name="NameSR" template="FormSingleRowMiddleTemplate">
<FormField name="NAME" label="Name:" type="textfield" datatype="string" required="false" visible="list,form,filter"
maxlength="64" editable="false" filter="SQL[UPPER(NAME) LIKE UPPER(dbo.STRINGJOIN('','%',{FILTER.NAME},'%',NULL)]"/>
<FormField name="OWNER" label="Owner:" type="textfield" datatype="string" required="false" visible="list,form,filter"
editable="false" filter="SQL[UPPER(OWNER) LIKE UPPER(dbo.STRINGJOIN('','%',{FILTER.OWNER},'%',NULL)]"/>
</FormSingleRow>
...
</FormGroup>
<FormGroup name="PublishFeature_Group" label="Select Features">
<FormTable name="FEATUREGRID" label=" " idfield="ID" multiselect="true" datatype="string"
type="table" rowcount="5" required="false" persisted="false"
lov="SQL[SELECT ID,NAME FROM RPI_FEATURE WHERE ID IN (SELECT FEATURE_ID FROM
RPI_THEME_FEATURE WHERE THEME_ID={FORM.THEME_ID})
AND ID NOT IN (SELECT FEATURE_ID FROM RPI_PUBLISHORDER_FEATURE WHERE PUBLISHORDER_ID={FORM.ID})
ORDER BY UPPER(NAME)]" editable="SCRIPT[IG.hasValue('ALLOWEDIT')]">
<FormTableField name="NAME" label="Feature" width="400"/>
<FormAction name="TriggerPublishFeatures" label="Assign Feat." editable="SCRIPT[IG.hasValue('ALLOWEDIT')]"
action="SCRIPT[IG.trigger({triggerName:'TriggerPublishFeatures',reloadFields:['PUBLISHFEATUREGRID','FEATUREGRID']})]"
help="Assign selected Features to Publish-Order"/>
</FormTable>
</FormGroup>
...
</FormTab>
<FormAction name="NewPO" label="New Publish" action="SCRIPT[IG.navigate(10230)]" visible="list" />
</Form>
</FormList>