FormTable

From GeoMedia Smart Client
Jump to: navigation, search
Settings WorkflowSetting FormSetting CommonSetting
FormSetting FormList Include Offline Form Form FormFilter FormTab FormGroup FormReport FormSingleRow FormField FormMap FormFile FormTable/FormTableField FormAction & Parameters




Example

Grid


  1. ...
  2. <FormTable name="SYMBOLOGYGRID" datatype="string" idfield="ID" required="false" persisted="false" selectionmode="single"
  3.                 rowcount="8" lov="SQL[SELECT ID,NAME FROM RPI_SYMBOLOGY WHERE SYMBOLOGYLIBRARY_ID={FORM.ID} ORDER BY UPPER(NAME)]">
  4.      <FormTableField name="NAME" label="Symbology Definition" width="450"/>
  5.      <FormAction name="EditSymbology" label="Edit" action="SCRIPT[IG.loadSymbology({ROW.ID})]" type="row" image="ig-icon-edit" submit="false"/>
  6.      <FormAction name="DeleteSymbology" label="Delete Symbology" 
  7.           action="SCRIPT[IG.remove({
  8.              confirmMessage:'Do you really want to remove the symbology', 
  9.              urlParams:{symbologyId:{ROW.ID}}, 
  10.              controller:'Symbology', action:'DeleteSymbology', 
  11.              reloadFields:['SYMBOLOGYGRID', 'ALTERNATIVESYMBOLOGYGRID']})]"
  12.           type="row" image="ig-icon-delete"/>
  13.      <FormAction name="NewDefinition" label="Add" action="SCRIPT[IG.navigate(32)]" />
  14. </FormTable>
  15. ...



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
  • date
  • datetime
  • guid
  • guidstring
  • number
  • string
  • timestamp
  • createtimestamp
  • createtimestampstring


 
 <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:

  • defaultvalue="SQL[...]"
  • defaultvalue="OBJECT[...]"
  • defaultvalue="SCRIPT[...]"
  • defaultvalue="text"
  • defaultvalue="{PLACEHOLDER}"


ad a)

 <FormTable ... defaultvalue="SQL[SELECT NAME FROM PERSON WHERE ID={FORM.PERSON_ID}" ... />


ad b)

 <FormTable ... defaultvalue="SQL[SELECT SYSDATE FROM DUAL]" ... />
 <FormTable ... defaultvalue="OBJECT[classname.methodname({SESSION.SELECTION})]" ... />
 <FormTable ... defaultvalue="SCRIPT[classname.methodname(variable1, variable2, ...)]" ... />
 <FormTable ... defaultvalue="Austria"... />


PLACEHOLDER:

 <FormTable ... defaultvalue="{FORM.AGENCY_ID}" ... />
 <FormTable ... defaultvalue="{RESSOURCE.BLUBB}" ... />
editable no Boolean value which defines if the form is editable:
  • editable="true"
  • editable="SCRIPT[...]"
  • editable="SESSION[KeyExists(...)]"
  • editable="SQL[...]"
  • editable="OBJECT[...]"


 <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"):
  • lov="SQL[...]"
  • lov="LIST[name1=value1;name2=value2;...]"
  • lov="OBJECT[...]"


 <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:
  • required="true"
  • required="SCRIPT[...]"
  • required="{FORM.FIELDNAME}"
  • required="{SESSION.SELECTION}"


 <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:
  • none: no row may be selected (default value)
  • single: one row may be selected
  • multiple: many rows may be selected


 <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:

  • sqlselect="SQL[Select - statement]"
  • sqlselect="SQL[Column as XY]"
  • sqlselect="SQL[CASE-Statements]"
  • sqlselect="SQL[DECODE-Statements]"


 <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:
  • validation="SCRIPT[...]"
  • validation="OBJECT[...]"
  • validation="SQL[...]"

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:
  • visible="false"
  • visible="SESSION[KeyExists(...)]"
  • visible="SCRIPT[...]"
  • visible="form"
  • visible="hidden"
  • visible="OBJECT[...]"
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