FormTable
From GeoMedia Smart Client
Jump to: navigation, search
Categories | Main Page • Installation • Administrator • Public Maps • Smart Client • Workflows • Tutorials |
Workflows | Overview • Editor • Settings • Design • API Changes • Navigation Concept • JavaScript API |
Settings | WorkflowSetting • FormSetting • CommonSetting |
FormSetting | FormList • Include • Offline Form • Form • FormFilter • FormTab • FormGroup • FormReport • FormSingleRow • FormField • FormMap • FormFile • FormTable/FormTableField • FormAction & Parameters |
Example
...
<FormTable name="SYMBOLOGYGRID" datatype="string" idfield="ID" required="false" persisted="false" selectionmode="single"
rowcount="8" lov="SQL[SELECT ID,NAME FROM RPI_SYMBOLOGY WHERE SYMBOLOGYLIBRARY_ID={FORM.ID} ORDER BY UPPER(NAME)]">
<FormTableField name="NAME" label="Symbology Definition" width="450"/>
<FormAction name="EditSymbology" label="Edit" action="SCRIPT[IG.loadSymbology({ROW.ID})]" type="row" image="ig-icon-edit" submit="false"/>
<FormAction name="DeleteSymbology" label="Delete Symbology"
action="SCRIPT[IG.remove({
confirmMessage:'Do you really want to remove the symbology',
urlParams:{symbologyId:{ROW.ID}},
controller:'Symbology', action:'DeleteSymbology',
reloadFields:['SYMBOLOGYGRID', 'ALTERNATIVESYMBOLOGYGRID']})]"
type="row" image="ig-icon-delete"/>
<FormAction name="NewDefinition" label="Add" action="SCRIPT[IG.navigate(32)]" />
</FormTable>
...
FormTable - Attributes
Attribute | Mandatory | Description |
---|---|---|
name | yes | Unique name (inside the form) of the FormTable.
<FormTable ... name="PERSON_EMPLOYER_GRID" ... /> |
authorization | no | Only users with the appropriate Role/Claim are authorized to view/process the element.
<FormTable ... authorization="ROLE[ADMIN,EDITOR]" ... /> <FormTable ... authorization="CLAIM[WF_ADMIN,WF_EDIT]" ... /> |
datatype | no |
<FormTable ... datatype="string" ... /> |
defaultvalue | no | Attribute can be used to set a value for:
a) a non-persisted FormField or b) to define a standard value for a FormField This attribute can be generated in several ways:
<FormTable ... defaultvalue="SQL[SELECT NAME FROM PERSON WHERE ID={FORM.PERSON_ID}" ... />
<FormTable ... defaultvalue="SQL[SELECT SYSDATE FROM DUAL]" ... /> <FormTable ... defaultvalue="OBJECT[classname.methodname({SESSION.SELECTION})]" ... /> <FormTable ... defaultvalue="SCRIPT[classname.methodname(variable1, variable2, ...)]" ... /> <FormTable ... defaultvalue="Austria"... />
<FormTable ... defaultvalue="{FORM.AGENCY_ID}" ... /> <FormTable ... defaultvalue="{RESSOURCE.BLUBB}" ... /> |
editable | no | Boolean value which defines if the form is editable:
<FormTable ... editable="false" ... /> |
idfield | no | Definition of the Primary Key in the LoV statement.
<FormTable ... idfield="ID" ... /> |
label | no | Label for the FormField displayed in Workflow-Form.
<FormTable ... label="Emergency Organisation:" ... /> |
lov | no | Element for List-of-Values which should be used in the FormField. The LoV can be generated in several ways (makes sense only in context with certain types, like type="combobox"):
<FormTable ... lov="SQL[SELECT MODEL FROM VEHICLE_LOOKUP WHERE MAKE={FORM.MAKE} ORDER BY MODEL]" ... /> <FormTable ... lov="LIST[black=schwarz;blue=blau;red=rot]" ... /> ... |
maxlength | no | Defines the maximum input length for a FormTable.
<FormTable ... maxlength="10" ... /> |
override | no | Boolean value. If it is set true the defaultvalue always be overriding the value of the database.
<FormTable ... override="true" /> |
persisted | no | Boolean value which defines if the FormTable can be stored inside the actual table. If persisted="true" (default), the ID-values of the Grid will be stored as a coma-separated string in the Table-Field.
<FormTable ... persisted="false" .../> |
required | no | Boolean value which defines if the FormField may contain NULL values or not. The attribute can be generated in several ways:
<FormTable ... required="false" ... /> |
rowcount | no | Defines the number of lines which are shown in the table. If the number of records exceeds the rowcount, a pagination is added to the FormTable automatically.
<FormTable ... rowcount="5" ... /> |
saveinsession | no | Attribute to persist (after a submit) the actual FormField-value in a session variable, which can be referenced later (for example, from another Form), for example:
saveinsession="FORMNAME.FORMFIELDNAME" This variable will be stored in the SEC_SESSION table.
<FormTable ... saveinsession="ACTIVE_TASK.STATUS_ID" ... /> |
selectionmode | no | Defines how many items may be selected in a formTable. Possible values are:
<FormTable ... selectionmode="single" ... /> |
sqlselect | no | The attribute sqlselect should be used if the FormTable is a non-persisted field and therefore not filled from the form table. While sqlselect is used to fill the FormField in the List-Controller, the defaultvalue is the corresponding statement in the Form-Controller.
SQL-statements (as well as parts of SQL-statements) can be used. There are several possibilities:
<FormTable ... sqlselect="SQL[Select (DESCRIPTION <nowiki>||' '||</nowiki> SUBDESCRIPTION) as TYPE FROM INCIDENTTYPE WHERE INCIDENTTYPE.ID = INCIDENT1.TYPE_ID]" ... /> <FormTable ... sqlselect="SQL[NAME as FIRSTNAME]" ... /> <FormTable ... sqlselect="SQL[CASE {FORM.COUNTRY} WHEN 'Germany' THEN 'de' WHEN 'Great Britain' THEN 'en' ELSE 'N/A']" ... /> <FormTable ... sqlselect="SQL[DECODE({FORM.COUNTRY},'Austria',1,0)]" ... /> |
template | no | Defines which template should be used for the FormTable representation. Currently the template="TableBigTemplate" is supported for the type="table". When using this template, the enclosing FormGroup must use the template="FormGroupNoHelpTemplate".
<FormTable ... template="TableBigTemplate" ... /> |
validation | no | The validation of user input can be done at runtime using the following methods:
As a result, either of these methods must deliver true or false (1/0).
<FormTable ... validation="SCRIPT[...]" ... /> <FormTable ... validation="OBJECT[classname.methodname({SESSION.SELECTION})]" ... /> <FormTable ... validation="SQL[SELECT DECODE(COUNT(*),0,1,0) FROM PR_UNIT WHERE PR_ID={FORM.PR_ID}]" ... /> |
validationmessage | no | You can define your own error message and has to be defined if there is an server side validation. |
visible | no | Sets the visibility of the FormField and defines in which workflow-elements the FormField should be used/should be visible:
Note: Multiple visible="filter" definitions of various FormFields are concatenated with "AND".
<FormTable ... visible="false" ... /> <FormTable ... visible="form[SCRIPT[IG.hasValue('ISDEFAULT')]]" ... /> |
If selectionmode="multiple", then saveinsession will store a coma separated string of the ID values; otherwise, the actual ID value will be persisted in the SEC_SESSION table.
The FormTableField element is used to define the width of the FormTable column and to define a column-alias.
FormTableField - Attributes
Attribute | Mandatory | Description |
---|---|---|
name | yes | Unique name (inside the form) of the FormTable-Column.
<FormTableField ... name="PERSON_EMPLOYER_GRID" ... /> |
label | no | Label of the FormTable-Column.
<FormTableField ... label="Emergency Organisation:" ... /> |
datatype GMSC 2014 | no | Datatype of the FormTable-Column. Necessary for correct display format.
<FormTableField ... datatype="datetime" ... /> |
width GMSC 2014 | no | Explicit width-setter (pixel) for the FormTable-Column. If no value is set, the width of all columns are getting automatically calculated by KendoUI-Web.
<FormTableField ... width="450" ... /> |
Language: | English |
---|