Forms
Every feature type can have multiple display forms defined. Different forms can be used for different actions with feature: displaying, inserting, capturing graphics, capturing semantics, ...
All forms for a feature type are defined within the featureType metadata definition. Forms are defined inside the formArray collection.
Example: Definition of a form inside the feature type.
<ber:featureTypeArray>
...
<ber:featureType id="ft_pipe" name="Pipeline" parentId="ft_parent">
...
<ber:featureAttributeArray> <!-- Array of Feature Attributes -->
<ber:attribute id="at_pipe_1" name="Diameter" dbName="C_W_DIAMETER"
nillable="false">
<ber:dataType> <!-- Reference to a code list -->
<ber:codeListRef refId="cl_105" displayColumn="ca_10502"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_pipe_2" name="Length [m]" dbName="LENGTH">
<ber:description>The length of a pipeline</ber:description>
<ber:dataType> <!-- Decimal number -->
<ber:decimal precision="10" scale="2"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_pipe_3" name="Material" dbName="C_W_MATERIAL"
nillable="false">
<ber:dataType> <!-- Reference to a code list -->
<ber:codeListRef refId="cl_102" displayColumn="ca_10202"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_pipe_4" name="Note" dbName="NOTE" nillable="true">
<ber:description>Notes for the record</ber:description>
<ber:dataType> <!-- String value -->
<ber:string maxLength="80"/>
</ber:dataType>
</ber:attribute>
<ber:featureRefAttribute id="at_pipe_5" name="Master feature" dbName="FREF">
<ber:dataType>
<ber:featureRef>
<ber:attribute refId="at_master_1"/>
<ber:attribute refId="at_master_2" default="true"/>
<ber:attribute refId="at_master_3"/>
<ber:featureRefRelationAssoc refId="r_1"/>
</ber:featureRef>
</ber:dataType>
</ber:featureRefAttribute>
</ber:featureAttributeArray>
...
<ber:formArray> <!-- Array of Forms -->
<ber:form id="fm_pipe_1" name="Pipeline – complex">
<ber:fieldGroup>
<ber:field id="f_1" refId="at_pipe_4" readOnly="false"
label="Description" length="80"/>
<ber:field refId="at_pipe_2" readOnly="false" length="80"/>
</ber:fieldGroup>
<ber:fieldGroup>
<ber:separator/>
<ber:field refId="at_pipe_1" readOnly="false"
label="Pipe diameter" length="80"/>
<ber:field refId="at_pipe_3" readOnly="true" length="80"/>
</ber:fieldGroup>
<ber:fieldGroup>
<ber:caption id="c_1" label="FeatureRef attributes"
collapsible="expanded"/>
<ber:field refId="at_pipe_5"/>
<ber:field attributePath="at_pipe_5/at_master_1" label="Master name"
length="90"/>
<ber:field attributePath="at_pipe_5/at_master_3" label="Master type"/>
<ber:field attributePath="at_pipe_5/at_master_3/ca_5"
label="Master type 2"/>
</ber:fieldGroup>
<ber:fieldGroup>
<ber:caption id="c_1" label="System attributes"
collapsible="collapsed"/>
<ber:field id="f_11" refId="createdBy" label="Created by" length="90"/>
<ber:field refId="createDate" label="Create date" length="90"/>
<ber:field refId="updatedBy" label="Updated by" length="90"/>
<ber:field refId="updateDate" label="Update date" length="90"/>
<ber:field id="f_8" refId="id" length="40"/>
<ber:field refId="sid" length="40"/>
<ber:field refId="ftid" length="80"/>
<ber:field refId="longTransactionId" length="40"/>
</ber:fieldGroup>
</ber:form>
<ber:form id="fm_pipe_2" name="Pipeline – reduced, read-only">
<ber:fieldGroup>
<ber:field refId="at_pipe_1" readOnly="true" length="45"/>
<ber:field refId="at_pipe_3" readOnly="true" length="120"/>
</ber:fieldGroup>
</ber:form>
<ber:assignedForms>
<ber:assignedForm usage="default" refId="fm_pipe_1"/>
<ber:assignedForm usage="insertSemantics" refId="fm_pipe_1"/>
<ber:assignedForm usage="insertGraphics" refId="fm_pipe_1"/>
<ber:assignedForm usage="updateSemantics" refId="fm_pipe_1"/>
<ber:assignedForm usage="wms" refId="fm_pipe_2"/>
<ber:assignedForm usage="locate" refId="fm_pipe_2"/>
</ber:assignedForms>
</ber:formArray>
</ber:featureType>
...
</ber:featureTypeArray>
Form element is optional. It is allowed to use just <assignedForms> element without needing to define <form> element.
In case of shared semantics, forms should be defined on the level of semantic parent feature type only. Forms should not be defined for shared semantics graphic feature types.
Form consists of fields with these properties:
- id – Optional field identifier. Currently used just for translating in case of multi-language project
- refId or attributePath – Mandatory reference to the feature attribute displayed in this form field
- refId can be used just to simple referring feature type attribute
- attributePath can be used for featureRef attribute to refer particular master feature attribute, optionally including a codelist column
- label – Form field label. Optional for refId, mandatory for attributePath. In case the label is not specified, it is taken from feature attribute name.
- length – Form field length. It is used to define column width in a feature list based on the form.
- readOnly – Defines whether the form field is read-only (true) or editable (false).
Form fields are organized into fieldGroups. A fieldGroup can start either with <separator> or <caption> element.
- separator - represents just simple horizontal line without additional attributes
- caption– is more complex element with optional attributes:
- id – currently used just for translating in case of multi-language project
- label – text value displayed in the field group header
- collapsible – allowed values are: expanded|collapsed|false. Default is false.
Feature type can define any number of forms. Forms can be assigned to the specific actions using assignedForms section (list can be extended according to the application needs):
- default – This form is used by default, i.e. in case when form for specific action is not defined.
- insertSemantics – This form is used when inserting semantics for a feature.
- insertGraphics – This form is used when inserting graphics for a feature.
- updateSemantics – This form is used when inserting semantics for a feature.
- updateGraphics – This form is used when updating graphics for a feature.
- locate – This form is used when locating feature in graphic view.
- plotReport – This form is used when outputting a feature to plot report.
- wms – This form is used whenever accessing data through WMS, e.g. in LIDS Browser.
- mobileSimple – This form is used for displaying list of features in LIDS Mobile.
- mobileFull – This form is used for displaying of the single feature in LIDS Mobile.