FormAction

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



The FormAction element is used for the integration of buttons inside a form.

FormAction


FormAction - Attributes

Attribute Mandatory Description
name yes The name of the FormAction. If no label is defined, the name will be displayed.


 <FormAction ... name="Delete" ... />
action no There is a set of predefined actions:

DefaultController

  • Form/Save (save)
  • Form/Delete (delete)
  • Form/Index (Form)
  • List/Index (List)
  • List/Select
  • Workflow/Index

CustomController: Any controller defined and programmatically implemented by the customer.

JavaScript:

DefaultJavaScript:

  • SCRIPT[IG.trigger({...})]
  • SCRIPT[IG.openModalForm({...})]

CustomJavaScript: Any JavaScript defined and programmatically implemented by the customer.

 <FormAction ... action="redirect" ... />
 <FormAction ... action="SCRIPT[IG.trigger({triggerNames:'DoThisAndThatTrigger',...
  ...reloadFields:['FIELD1', 'FIELD2'], validateFields:['FIELD1', 'FIELD2']})]" ... />


  • reloadFields: defines FormFields, which should be reloaded after a trigger event
  • validateFields: defines FormFields, which must not be empty for the trigger action
authorization no Only users with the appropriate Role/Claim are authorized to view/process the element.


 <FormAction ... authorization="ROLE[ADMIN,EDITOR]" ... />
 <FormAction ... authorization="CLAIM[WF_ADMIN,WF_EDIT]" ... />
editable no Boolean value which defines if the form is editable:
  • editable="true"
  • editable="SCRIPT[...]"
  • editable="SESSION[KeyExists(...)]"
  • editable="SQL[...]"
  • editable="OBJECT[...]"


 <FormAction ... editable="false" ... />
help no Help text for the button.


 <FormAction ... help="Press this button for ..." ... />
image no Defines an image for the FormAction.


 <FormAction ... image="ig-icon-add" ... />
label no Label text for the FormAction.


 <FormAction ... label="Delete Data" ... />
submit no Submit-Parameter for the FormAction; if not set explicitly, the defaultvalue is submit="false", which references a HTTP-GET Request. If submit="true", the HTTP-POST Request is used.


 <FormAction ... submit="true" ... />
type no Defines the display-type of the FormAction, possible values:
  • field
  • form
  • row


 <FormAction ... type="row" ... />
visible no Defines where the FormAction-element will be visible. Possible values:
  • visible="list" - the button will be visible in the list-page (preceding the form-page).
  • visible="list" type="row" - an edit button will be visible in each row of the list-page (preceding the form-page).
  • visible="form"
  • visible="hidden"


 <FormAction ... visible="form" .../>


The image below contains a FormAction:

 <FormAction name="DeleteProject" label="Delete Project" action="edit" visible="list" type="row" image="ig-icon-delete"/>



which enables the user to use the row-edit function; it will be displayed like this:

0412 button list row.png

Scrolling through several pages inside a List-Controller is done via "First", "Previous", "Next", and "Last" icon-buttons (see image below). The buttons are generated automatically and the attribute pagesize=... is responsible for the number of lines in the list.


0412 prev next.png

After pressing the delete button, a modal form will open on top of the list, and the user can assign the data deletion.


0412 button list row modal.png


The Param element is used for the definition of additional FormAction-parameters. It consists of name-value pairs, and both are mandatory.

Param - Attributes

Attribute Mandatory Description
name yes as name / value can adopt a wide range of different values; no explicit name:value-pairs will be given here.
value yes see above

Examples:

The first example shows the use in context with the redirect-action where a nodeid and its value are assigned:

 <FormAction name="REDIRECT" label="Neue Aktion" action="SCRIPT[IG.navigate(10)" visible="list" />



In the second example, a NodeID, a follownode, and a form are defined.

 <FormAction name="REDIRECTPARAM" label="Neuer Parameter" action="Form/Index" visible="form">
  <Param name="nodeid" value="4041" />
 </FormAction>



Language: English