From wiki.ginstr.com
Jump to: navigation, search
Line 1: Line 1:
==Action Library==
 
 
[[Category:Actions]]
 
[[Category:Actions]]
All possible actions on widgets are defined here. Event type defines how an action is triggered. If an action does not have an event associated with it then it has to be nested in an action that has one in order to execute it. Action defines what will be done after trigger (event).
+
All possible [[actions]] on [[widgets]] are defined here. Event type defines how an action is triggered. If an action does not have an event associated with it then it has to be nested in an action that has one in order to execute it. Action defines what will be done after trigger (event).
 
   
 
   
Actions can be categorized by the following:
+
[[Actions]] can be categorised by the following:
 
#By an event type:
 
#By an event type:
#:;a. Event bound : actions can be written like an XML attribute of a widget
+
#:;a. Event bound : [[actions]] can be written like an XML attribute of a widget
#:;b. Not event bound : actions need to be part of another action executed in a set or as value of other action
+
#:;b. Not event bound : [[actions]] need to be part of another action executed in a set or as value of other action
 
#By database relation
 
#By database relation
 
#:;a. With database relation : these actions perform some task on database (query, insert, update data), and usually have <code>“gn:data_”</code> parameters from same or related widget.
 
#:;a. With database relation : these actions perform some task on database (query, insert, update data), and usually have <code>“gn:data_”</code> parameters from same or related widget.
Line 13: Line 12:
 
----
 
----
  
The table below contains a brief description of all possible actions.
+
The table below contains a brief description of all possible [[actions]].
  
 
Full details on each action can be found by clicking on the Action Name
 
Full details on each action can be found by clicking on the Action Name
  
{| class="wikitable"
+
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
!colspan="2"|Action Library
 
 
|-
 
|-
|'''Action Name'''
+
! scope="col" | Action
|'''Brief Description'''
+
! scope="col" | Brief Description
 
|-
 
|-
|[[gn:act_toLayoutClick]],<br>[[gn:act_toLayoutLongClick]],<br>[[gn:act_toLayoutSwipe]]
+
| title="Action" | <code>[[gn:act_toLayoutClick]]</code>,<br><code>[[gn:act_toLayoutLongClick]]</code>,<br><code>[[gn:act_toLayoutSwipe]]</code>
|Actions that change displayed root layout to desired target
+
| title="Brief Description" | Actions that change displayed root layout to desired target
 
|-
 
|-
|[[gn:act_blockBack]]
+
| title="Action" | <code>[[gn:act_blockBack]]</code>
|Action that blocks going to previous screen if user presses hardware back button or executes [[gn:act_goLayoutBack]]
+
| title="Brief Description" | Action that blocks going to previous screen if user presses hardware back button or executes <code>[[gn:act_goLayoutBack]]</code>
 
|-
 
|-
|[[gn:act_goLayoutBack]]
+
| title="Action" | <code>[[gn:act_goLayoutBack]]</code>
|Actions that change displayed root layout to desired target
+
| title="Brief Description" | Returns to previous screen
 
|-
 
|-
|[[gn:act_toLayoutItemSelect]]
+
| title="Action" | <code>[[gn:act_toLayoutItemSelect]]</code>
|Opens target layout based on selected item value in selector widget
+
| title="Brief Description" | Opens target layout based on selected item value in selector widget
 
|-
 
|-
|[[gn:act_validate]]
+
| title="Action" | <code>[[gn:act_validate]]</code>
|Validates widget upon its content change/selection event
+
| title="Brief Description" | Validates widget upon its content change/selection event
 
|-
 
|-
|[[gn:act_validateScreen]]
+
| title="Action" | <code>[[gn:act_validateScreen]]</code>
 
|Validates entire screen when executed
 
|Validates entire screen when executed
 
|-
 
|-
|[[gn:act_toast]]
+
| title="Action" | <code>[[gn:act_toast]]</code>
|Displays toast message
+
| title="Brief Description" | Displays toast message
 
|-
 
|-
|[[gn:act_cleanWidgets]]
+
| title="Action" | <code>[[gn:act_cleanWidgets]]</code>
|Cleans widget of contents
+
| title="Brief Description" | Cleans widget of contents
 
|-
 
|-
|[[gn:act_getWidgetData]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_getWidgetData]]</code><br>(DEPRECATED)
|Stores data from widgets into persistent storage
+
| title="Brief Description" | Stores data from [[widgets]] into persistent storage
 
|-
 
|-
|[[gn:act_setWidgetData]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_setWidgetData]]</code><br>(DEPRECATED)
|Retrieves widget data from persistent storage and places it into widgets
+
| title="Brief Description" | Retrieves widget data from persistent storage and places it into [[widgets]]
 
|-
 
|-
|[[gn:act_data_write]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_data_write]]</code><br>(DEPRECATED)
|Retrieves widget data in <code>dbRequest</code> and uses additional attributes from widget and saves data from dbRequest that is in the persistent storage into database
+
| title="Brief Description" | Retrieves widget data in <code>dbRequest</code> and uses additional attributes from widget and saves data from <code>dbRequest</code> that is in the persistent storage into database
 
|-
 
|-
|[[gn:act_update]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_update]]</code><br>(DEPRECATED)
|Updates existing record in database with values from dbRequest
+
| title="Brief Description" | Updates existing record in database with values from <code>dbRequest</code>
 
|-
 
|-
|[[gn:act_update_values]]
+
| title="Action" | <code>[[gn:act_update_values]]</code>
|Action has all the properties of [[gn:act_update]] action with one difference. When certain column in updating row data is omitted the previously saved column value for this omitted column is kept. This action can easily append or update only certain columns keeping the rest of the row as it was.
+
| title="Brief Description" | Action has all the properties of <code>[[gn:act_update]]</code> action with one difference. When certain column in updating row data is omitted the previously saved column value for this omitted column is kept. This action can easily append or update only certain columns keeping the rest of the row as it was.
 
|-
 
|-
|[[gn:act_query]]
+
| title="Action" | <code>[[gn:act_query]]</code>
|Retrieves widget data in <code>dbRequest</code> and accesses data stored by retrieving widget data in persistent storage and making a query with it
+
| title="Brief Description" | Retrieves widget data in <code>dbRequest</code> and accesses data stored by retrieving widget data in persistent storage and making a query with it
 
|-
 
|-
|[[gn:act_querySortReverseTop]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_querySortReverseTop]]</code><br>(DEPRECATED)
|Identical to [[gn:act]] query, except for this query returns the sorted query by some key, after sorting it returns only the top row of result if multiple results are returned.  
+
| title="Brief Description" | Identical to <code>[[gn:act]]</code> query, except for this query returns the sorted query by some key, after sorting it returns only the top row of result if multiple results are returned.  
 
|-
 
|-
|[[gn:act_queryWiFiFingerprint]]
+
| title="Action" | <code>[[gn:act_queryWiFiFingerprint]]</code>
|This query returns all data for specific user from table which contains WiFi finger-print values, with DbRequest defined in dbSchema. After the data is retrieved, this action will then compare current WiFi fingerprint with all records, it will return value from row with the closest WiFi fingerprint and sets the defined field value into target widget.
+
| title="Brief Description" | This query returns all data for specific user from table which contains WiFi fingerprint values, with <code>dbRequest</code> defined in <code>dbSchema</code>. After the data is retrieved, this action will then compare current WiFi fingerprint with all records, it will return value from row with the closest WiFi fingerprint and sets the defined field value into target widget.
 
|-
 
|-
|[[gn:act_queryGSMFingerprint]]
+
| title="Action" | <code>[[gn:act_queryGSMFingerprint]]</code>
|This query returns all data for specific user from table which contains GSM finger-print values, with DbRequest defined in dbSchema. After the data is retrieved, this action will then compare current GSM fingerprint with all records, it will return value from row with the closest GSM fingerprint and sets the defined field value into target widget.
+
| title="Brief Description" | This query returns all data for specific user from table which contains GSM fingerprint values, with <code>dbRequest</code> defined in <code>dbSchema</code>. After the data is retrieved, this action will then compare current GSM fingerprint with all records, it will return value from row with the closest GSM fingerprint and sets the defined field value into target widget.
 
|-
 
|-
|[[gn:act_queryBTFingerprint]]
+
| title="Action" | <code>[[gn:act_queryBTFingerprint]]</code>
|This query returns all data for specific user from table which contains bluetooth fingerprint values, with DbRequest defined in dbSchema. After the data is retrieved, this action will then compare current bluetooth fingerprint with all records, it will return value from row with the closest bluetooth fingerprint and sets the defined field value into target widget.
+
|This query returns all data for specific user from table which contains Bluetooth fingerprint values, with <code>dbRequest</code> defined in <code>dbSchema</code>. After the data is retrieved, this action will then compare current Bluetooth fingerprint with all records, it will return value from row with the closest Bluetooth fingerprint and sets the defined field value into target widget.
 
|-
 
|-
|[[gn:act_fill_dropdown]]
+
| title="Action" | <code>[[gn:act_fill_dropdown]]</code>
|Action queries a data table based on attributes and then it sets data into widget using an integrated action “gn:act_setWidgetData”.
+
| title="Brief Description" | Action queries a data table based on attributes and then it sets data into widget using an integrated action <code>[[gn:act_setWidgetData]]</code>.
 
|-
 
|-
|[[gn:act_queryItemSelect]]
+
| title="Action" | <code>[[gn:act_queryItemSelect]]</code>
|The action is used specifically on the dropdown widget. When an action is triggered on a widget that binds (contains) this action, its value is used to perform a query on another table. When a result is obtained it populates the target widget which is set as an attribute value of this action with data from the query.
+
| title="Brief Description" | The action is used specifically on the dropdown widget. When an action is triggered on a widget that binds (contains) this action, its value is used to perform a query on another table. When a result is obtained it populates the target widget which is set as an attribute value of this action with data from the query.
 
|-
 
|-
|[[gn:act_toLayoutClickDbVal]]
+
| title="Action" | <code>[[gn:act_toLayoutClickDbVal]]</code>
|An action look up in provided dbRequest table (table has to have one row) value that is defined by <code>[[gn:data_dbValRefKey]]=”field”</code>.  
+
| title="Brief Description" | An action look up in provided <code>dbRequest</code> table (table has to have one row) value that is defined by <code>[[gn:data_dbValRefKey]]=”field”</code>.  
 
|-
 
|-
|[[gn:act_cleanData]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_cleanData]]</code><br>(DEPRECATED)
|This action clears dbRequest that is defined in bound widget attributes. It performs a clean on dbRequests that contains only one row of data.  
+
| title="Brief Description" | This action clears <code>dbRequest</code> that is defined in bound widget attributes. It performs a clean on <code>dbRequests</code> that contains only one row of data.  
 
|-
 
|-
|[[gn:act_if]]
+
| title="Action" | <code>[[gn:act_if]]</code>
|Special action that acts as a conditional action. It accepts other actions as conditions and other actions that are defined to execute if condition was true or if it was false. If all conditions are true action will execute true block of actions, if any condition is false action will execute false block of actions.
+
| title="Brief Description" | Special action that acts as a conditional action. It accepts other actions as conditions and other actions that are defined to execute if condition was true or if it was false. If all conditions are true action will execute true block of actions, if any condition is false action will execute false block of actions.
 
|-
 
|-
|[[gn:act_table_exists]]
+
| title="Action" | <code>[[gn:act_table_exists]]</code>
|Action checks if a table exists. If a table exists it returns <code>true</code>, otherwise it returns <code>false</code>.
+
| title="Brief Description" | Action checks if a table exists. If a table exists it returns <code>true</code>, otherwise it returns <code>false</code>.
 
|-
 
|-
|[[gn:act_table_create]]
+
| title="Action" | <code>[[gn:act_table_create]]</code>
|Action that creates table.
+
| title="Brief Description" | Action that creates table.
 
|-
 
|-
|[[gn:act_hideWidgets]]
+
| title="Action" | <code>[[gn:act_hideWidgets]]</code>
|Action that hides widgets on the screen. It can be used to hide one or more or all widgets on the screen.
+
| title="Brief Description" | Action that hides [[widgets]] on the screen. It can be used to hide one or more or all [[widgets]] on the screen.
 
|-
 
|-
|[[gn:act_showWidgets]]
+
| title="Action" | <code>[[gn:act_showWidgets]]</code>
|Action that shows widgets on the screen. It can be used to show one or more or all widgets on the screen.
+
|Action that shows [[widgets]] on the screen. It can be used to show one or more or all [[widgets]] on the screen.
 
|-
 
|-
|[[gn:act_isChecked]]
+
| title="Action" | <code>[[gn:act_isChecked]]</code>
|Action that returns if GnCheckbox widget is checked or not. It can be used with <code>[[gn:act_if]]</code> to create behaviour if a widget is checked do a certain behaviour or otherwise do a different behaviour depending on the use case.
+
| title="Brief Description" | Action that returns if GnCheckbox widget is checked or not. It can be used with <code>[[gn:act_if]]</code> to create behaviour if a widget is checked do a certain behaviour or otherwise do a different behaviour depending on the use case.
 
|-
 
|-
|[[gn:act_hideKeyboard]]
+
| title="Action" | <code>[[gn:act_hideKeyboard]]</code>
|Action that hides keyboard.
+
| title="Brief Description" | Action that hides keyboard.
 
|-
 
|-
|[[gn:act_hasTableRights]]
+
| title="Action" | <code>[[gn:act_hasTableRights]]</code>
|Action that returns if logged in user has rights to specific table or not. To be used only after user has passed login at GnLogin widget
+
| title="Brief Description" | Action that returns if logged in user has rights to specific table or not. To be used only after user has passed login at GnLogin widget
 
|-
 
|-
|[[gn:act_setSelectedItem]]
+
| title="Action" | <code>[[gn:act_setSelectedItem]]</code>
|Dropdown has to contain data before <code>setSelectedItem</code> is used. This action selects dropdown item GnDropDown. The action has to be declared at [[GnDropDown]] widget on which item will be selected in an action set.
+
| title="Brief Description" | Dropdown has to contain data before <code>setSelectedItem</code> is used. This action selects dropdown item <code>[[GnDropDown]]</code>. The action has to be declared at <code>[[GnDropDown]]</code> widget on which item will be selected in an action set.
 
|-
 
|-
|[[gn:act_copyData]]
+
| title="Action" | <code>[[gn:act_copyData]]</code>
|Copies content from source widget to destination widget.  
+
| title="Brief Description" | Copies content from source widget to destination widget.  
 
|-
 
|-
|[[gn:act_widgetContent]]
+
| title="Action" | <code>[[gn:act_widgetContent]]</code>
|Checks content of a widget and compares it with keyword. This is useful for business logic checks depending on some result or data in some widget, field
+
| title="Brief Description" | Checks content of a widget and compares it with keyword. This is useful for business logic checks depending on some result or data in some widget, field
 
|-
 
|-
|[[gn:act_widgetContentJoin]]
+
| title="Action" | <code>[[gn:act_widgetContentJoin]]</code>
|Takes content of multiple widgets and joins the content and stores it into target [[EditText]] or [[GnEditText]].
+
| title="Brief Description" | Takes content of multiple [[widgets]] and joins the content and stores it into target <code>[[EditText]]</code> or <code>[[GnEditText]]</code>.
 
|-
 
|-
|[[gn:act_joinTextualValues]]
+
| title="Action" | <code>[[gn:act_joinTextualValues]]</code>
|Takes content of multiple widgets, joins the text content separated by separator value and stores it into the target.
+
| title="Brief Description" | Takes content of multiple [[widgets]], joins the text content separated by separator value and stores it into the target.
 
|-
 
|-
|[[gn:act_lockScreenOrientation]]
+
| title="Action" | <code>[[gn:act_lockScreenOrientation]]</code>
|Locks screen orientation to desired orientation. Setting lock on orientation will keep the lock until the application is turned off. To remove the lock or switch it to another orientation action needs to be used again with different keyword
+
| title="Brief Description" | Locks screen orientation to desired orientation. Setting lock on orientation will keep the lock until the application is turned off. To remove the lock or switch it to another orientation action needs to be used again with different keyword
 
|-
 
|-
|[[gn:act_reloadAutoFilledWidgets]]
+
| title="Action" | <code>[[gn:act_reloadAutoFilledWidgets]]</code>
|Reloads GnEditText widgets that have special ability to autoload data
+
| title="Brief Description" | Reloads <code>[[GnEditText]]</code> widgets that have special ability to autoload data
 
|-
 
|-
|[[gn:act_calculate]]
+
| title="Action" | <code>[[gn:act_calculate]]</code>
|Performs calculation operations on different actors and stores result in target
+
| title="Brief Description" | Performs calculation operations on different actors and stores result in target
 
|-
 
|-
|[[gn:act_break]]
+
| title="Action" | <code>[[gn:act_break]]</code>
|Action is used to prevent further execution
+
| title="Brief Description" | Action is used to prevent further execution
 
|-
 
|-
|[[gn:act_convertTimestampToFormat]]
+
| title="Action" | <code>[[gn:act_convertTimestampToFormat]]</code>
|Action is used to convert timestamp (numerical value) from certain widget to human readable format.  
+
| title="Brief Description" | Action is used to convert timestamp (numerical value) from certain widget to human readable format.  
 
|-
 
|-
|[[gn:act_trigger]]
+
| title="Action" | <code>[[gn:act_trigger]]</code>
 
|Action is used to trigger any action set on a different widget
 
|Action is used to trigger any action set on a different widget
 
|-
 
|-
|[[gn:act_resetChrono]]
+
| title="Action" | <code>[[gn:act_resetChrono]]</code>
|Action is used to reset the chronometer time to 0
+
| title="Brief Description" | Action is used to reset the chronometer time to 0
 
|-
 
|-
|[[gn:act_startChrono]]
+
| title="Action" | <code>[[gn:act_startChrono]]</code>
 
|Action is used to start the chronometer to measure time
 
|Action is used to start the chronometer to measure time
 
|-
 
|-
|[[gn:act_stopChrono]]
+
| title="Action" | <code>[[gn:act_stopChrono]]</code>
|Action is used to stop (pause) the chronometer time measuring
+
| title="Brief Description" | Action is used to stop (pause) the chronometer time measuring
 
|-
 
|-
|[[gn:act_setChrono]]
+
| title="Action" | <code>[[gn:act_setChrono]]</code>
|Action sets chronometer to certain start time
+
| title="Brief Description" | Action sets chronometer to certain start time
 
|-
 
|-
|[[gn:act_debug_dbrequest]]
+
| title="Action" | <code>[[gn:act_debug_dbrequest]]</code>
|Action will dump content of dbRequest into folder $debug in currently used application root directory
+
| title="Brief Description" | Action will dump content of <code>dbRequest</code> into folder '''$debug''' in currently used application root directory
 
|-
 
|-
|[[gn:act_debug]]
+
| title="Action" | <code>[[gn:act_debug]]</code>
|Action will dump content of any action that has logging into folder $debug in currently used application root directory
+
| title="Brief Description" | Action will dump content of any action that has logging into folder $debug in currently used application root directory
 
|-
 
|-
|[[gn:act_setViewState]]
+
| title="Action" | <code>[[gn:act_setViewState]]</code>
|Action will change the state of any widget
+
| title="Brief Description" | Action will change the state of any widget
 
|-
 
|-
|[[gn:act_copyDataFromRow]]
+
| title="Action" | <code>[[gn:act_copyDataFromRow]]</code>
|Action will copy data from selected row from [[GnlistView]] widget to some other widget outside of [[GnListView]] widget.
+
| title="Brief Description" | Action will copy data from selected row from <code>[[GnlistView]]</code> widget to some other widget outside of <code>[[GnListView]]</code> widget.
 
|-
 
|-
|[[gn:act_showDialog]]
+
| title="Action" | <code>[[gn:act_showDialog]]</code>
|Action used to display a popup dialog
+
| title="Brief Description" | Action used to display a popup dialog
 
|-
 
|-
|[[gn:act_showDateTimeDialog]]
+
| title="Action" | <code>[[gn:act_showDateTimeDialog]]</code>
|Action used to display a datetime dialog
+
| title="Brief Description" | Action used to display a datetime dialog
 
|-
 
|-
|[[gn:act_setSrcImage]]
+
| title="Action" | <code>[[gn:act_setSrcImage]]</code>
|Action used to change image drawable for specified [[ImageView]] or [[GnImageView]] widget.
+
| title="Brief Description" | Action used to change image drawable for specified <code>[http://developer.android.com/reference/android/widget/ImageView.html ImageView]</code> or <code>[[GnImageView]]</code> widget.
 
|-
 
|-
|[[gn:act_smsSend]]
+
| title="Action" | <code>[[gn:act_smsSend]]</code>
|Action used to send an SMS message to multiple recipients
+
| title="Brief Description" | Action used to send an SMS message to multiple recipients
 
|-
 
|-
|[[gn:act_gmailSend]]
+
| title="Action" | <code>[[gn:act_gmailSend]]</code>
|Action used to send an email message to multiple recipients
+
| title="Brief Description" | Action used to send an email message to multiple recipients
 
|-
 
|-
|[[gn:act_showSingleChoiceDialog]]
+
| title="Action" | <code>[[gn:act_showSingleChoiceDialog]]</code>
|Action used to display a single choice dialog
+
| title="Brief Description" | Action used to display a single choice dialog
 
|-
 
|-
|[[gn:act_showProgressDialog]]
+
| title="Action" | <code>[[gn:act_showProgressDialog]]</code>
|Action used to display a progress dialog
+
| title="Brief Description" | Action used to display a progress dialog
 
|-
 
|-
|[[gn:act_hideProgressDialog]]
+
| title="Action" | <code>[[gn:act_hideProgressDialog]]</code>
|Action used to hide visible progress dialog
+
| title="Brief Description" | Action used to hide visible progress dialog
 
|-
 
|-
|[[gn:act_changeProgressDialog]]
+
| title="Action" | <code>[[gn:act_changeProgressDialog]]</code>
|Action used to change a value of progress dialog
+
| title="Brief Description" | Action used to change a value of progress dialog
 
|-
 
|-
|[[gn:act_showYesNoDialog]]
+
| title="Action" | <code>[[gn:act_showYesNoDialog]]</code>
|Action used to display yes, no dialog, with custom title, message , and buttons text
+
| title="Brief Description" | Action used to display yes, no dialog, with custom title, message , and buttons text
 
|-
 
|-
|[[gn:act_enableWidget]]  
+
| title="Action" | <code>[[gn:act_enableWidget]]</code>
|Action enables widgets for user interaction
+
| title="Brief Description" | Action enables [[widgets]] for user interaction
 
|-
 
|-
|[[gn:act_disableWidget]]
+
| title="Action" | <code>[[gn:act_disableWidget]]</code>
|Action disables widgets for user interaction
+
| title="Brief Description" | Action disables [[widgets]] for user interaction
 
|-
 
|-
|[[gn:act_performClick]]
+
| title="Action" | <code>[[gn:act_performClick]]</code>
|Performs a click action on targeted widget
+
| title="Brief Description" | Performs a click action on targeted widget
 
|-
 
|-
|[[gn:act_getDbRequestRowCount]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_getDbRequestRowCount]]</code><br>(DEPRECATED)
|Gets numbers of rows loaded into dbRequest and stores it to target widget
+
| title="Brief Description" | Gets numbers of rows loaded into <code>dbRequest</code> and stores it to target widget
 
|-
 
|-
|[[gn:act_isDbRequestMiddleRow]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_isDbRequestMiddleRow]]</code><br>(DEPRECATED)
|Used in if action to control the action flow. Returns <code>true</code> or <code>false</code> to check if current dbRequest row is in the middle of the set
+
| title="Brief Description" | Used in if action to control the action flow. Returns <code>true</code> or <code>false</code> to check if current <code>dbRequest</code> row is in the middle of the set
 
|-
 
|-
|[[gn:act_isDbRequestLastRow]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_isDbRequestLastRow]]</code><br>(DEPRECATED)
|Used in if action to control the action flow. Returns <code>true</code> or <code>false</code> to check if current dbRequest row is at end of the set
+
| title="Brief Description" | Used in if action to control the action flow. Returns <code>true</code> or <code>false</code> to check if current <code>dbRequest</code> row is at end of the set
 
|-
 
|-
|[[gn:act_widgetIncreaseCounter]]
+
| title="Action" | <code>[[gn:act_widgetIncreaseCounter]]</code>
|When action is executed it adds +1  to number stored in <code>@+id/targetWidget</code>
+
| title="Brief Description" | When action is executed it adds +1  to number stored in <code>@+id/targetWidget</code>
 
|-
 
|-
|[[gn:act_widgetDecreaseCounter]]
+
| title="Action" | <code>[[gn:act_widgetDecreaseCounter]]</code>
|When action is executed it subtracts +1 to number stored in <code>@+id/targetWidget</code>
+
| title="Brief Description" | When action is executed it subtracts -1 from number stored in <code>@+id/targetWidget</code>
 
|-
 
|-
|[[gn:act_rawQueryToWidget]]
+
| title="Action" | <code>[[gn:act_rawQueryToWidget]]</code>
|Action is used to query data from database and store value to a target
+
| title="Brief Description" | Action is used to query data from database and store value to a target
 
|-
 
|-
|[[gn:act_rawQueryToWidgets]]
+
| title="Action" | <code>[[gn:act_rawQueryToWidgets]]</code>
|Action is used to query data from database from multiple columns and store value to multiple targets
+
| title="Brief Description" | Action is used to query data from database from multiple columns and store value to multiple targets
 
|-
 
|-
|[[gn:act_rawQueryByRangeToDbRequest]] (DEPRECATED)
+
| title="Action" | <code>[[gn:act_rawQueryByRangeToDbRequest]]</code><br>(DEPRECATED)
|Action is used to query data from database from multiple columns and store value dbRequest
+
| title="Brief Description" | Action is used to query data from database from multiple columns and store value <code>dbRequest</code>
 
|-
 
|-
|[[gn:act_rawUpdateValues]]
+
| title="Action" | <code>[[gn:act_rawUpdateValues]]</code>
|Action is used to update data from sources (widgets, variables, resources,...) to database record.
+
| title="Brief Description" | Action is used to update data from sources ([[widgets]], variables, resources,...) to database record.
 
|-
 
|-
|[[gn:act_loadPointer]]
+
| title="Action" | <code>[[gn:act_loadPointer]]</code>
|Loads value for widget which contains pointer Id
+
| title="Brief Description" | Loads value for widget which contains pointer Id
 
|-
 
|-
|[[gn:act_scrollTo]]
+
| title="Action" | <code>[[gn:act_scrollTo]]</code>
|Automatic scrolling is executed to certain widget on screen
+
| title="Brief Description" | Automatic scrolling is executed to certain widget on screen
 
|-
 
|-
|[[gn:act_getVariableToWidget]]
+
| title="Action" | <code>[[gn:act_getVariableToWidget]]</code>
|Loads value of variable from memory and stores it into target
+
| title="Brief Description" | Loads value of variable from memory and stores it into target
 
|-
 
|-
|[[gn:act_setVariable]]
+
| title="Action" | <code>[[gn:act_setVariable]]</code>
|Loads value from target and stores it to variable
+
| title="Brief Description" | Loads value from target and stores it to variable
 
|-
 
|-
|[[gn:act_resetVariables]]
+
| title="Action" | <code>[[gn:act_resetVariables]]</code>
|Resets memory value holders for variables to definedValue values
+
| title="Brief Description" | Resets memory value holders for variables to <code>definedValue</code> values
 
|-
 
|-
|[[gn: act_setTimestampToVar]]
+
| title="Action" | <code>[[gn: act_setTimestampToVar]]</code>
|Loads special timestamp values to variable which are defined by keywords, or hardcoded value.
+
| title="Brief Description" | Loads special timestamp values to variable which are defined by keywords, or hardcoded value.
 
|-
 
|-
|[[gn:act_copyDropdownSelectedArrayValue]]
+
| title="Action" | <code>[[gn:act_copyDropdownSelectedArrayValue]]</code>
|Action is used to retrieve dropdown selected value from array value string-array into target widget.
+
| title="Brief Description" | Action is used to retrieve dropdown selected value from array value string-array into target widget.
 
|-
 
|-
|[[gn:act_rawWriteValues]]
+
| title="Action" | <code>[[gn:act_rawWriteValues]]</code>
|Action is used to write data into database table
+
| title="Brief Description" | Action is used to write data into database table
 
|-
 
|-
|[[gn:act_blinkView]]
+
| title="Action" | <code>[[gn:act_blinkView]]</code>
|Makes a view blink in specific intervals on screen
+
| title="Brief Description" | Makes a view blink in specific intervals on screen
 
|-
 
|-
|[[gn:act_callPhone]]
+
| title="Action" | <code>[[gn:act_callPhone]]</code>
|Performs phone call when action is executed
+
| title="Brief Description" | Performs phone call when action is executed
 
|-
 
|-
|[[gn:act_sendEmail]]
+
| title="Action" | <code>[[gn:act_sendEmail]]</code>
|Sends email when action is executed
+
| title="Brief Description" | Sends email when action is executed
 
|-
 
|-
|[[gn:act_rawBulkUpdateValues]]
+
| title="Action" | <code>[[gn:act_rawBulkUpdateValues]]</code>
|Updates values to database on multiple rows that are stored in widgets that contain multiple rows , such as [[ListView]]
+
| title="Brief Description" | Updates values to database on multiple rows that are stored in [[widgets]] that contain multiple rows , such as <code>[http://developer.android.com/reference/android/widget/ListView.html ListView]</code>
 
|-
 
|-
|[[gn:act_updateLstRowColumnFromWidget]]
+
| title="Action" | <code>[[gn:act_updateLstRowColumnFromWidget]]</code>
|Updates value held in widget with rows, row column by value from widget.
+
| title="Brief Description" | Updates value held in widget with rows, row column by value from widget.
 
|-
 
|-
|[[gn:act_isIdenticalFile]]
+
| title="Action" | <code>[[gn:act_isIdenticalFile]]</code>
|Action that compares if file that is stored on device is identical to file information last stored about the file
+
| title="Brief Description" | Action that compares if file that is stored on device is identical to file information last stored about the file
 
|-
 
|-
|[[gn:act_storeFileInfo]]
+
| title="Action" | <code>[[gn:act_storeFileInfo]]</code>
|Action that stores information about file internally. This information is later used by [[gn:act_isIdenticalFile]] action.
+
| title="Brief Description" | Action that stores information about file internally. This information is later used by <code>[[gn:act_isIdenticalFile]]</code> action.
 
|-
 
|-
|[[gn:act_rawQueryCountToTarget]]
+
| title="Action" | <code>[[gn:act_rawQueryCountToTarget]]</code>
|Executes query counts the rows returned and stores result into a target
+
| title="Brief Description" | Executes query counts the rows returned and stores result into a target
 
|-
 
|-
|[[gn:act_saveToVariable]]
+
| title="Action" | <code>[[gn:act_saveToVariable]]</code>
|Stores value variable in '''variables.xml''' file from target. Values that are stored in '''variables.xml''' are loaded into variables on startup of the ginstr application
+
| title="Brief Description" | Stores value variable in [[variables.xml]] file from target. Values that are stored in [[variables.xml]] are loaded into variables on startup of the ginstr application
 
|-
 
|-
|[[gn:act_updateUIbreak]]
+
| title="Action" | <code>[[gn:act_updateUIbreak]]</code>
|Breaks execution of the action block if a content update is necessary. The scenario to use this action is when setting some value in same action block into certain widget and in same block executing a decision based on content of that widget
+
| title="Brief Description" | Breaks execution of the action block if a content update is necessary. The scenario to use this action is when setting some value in same action block into certain widget and in same block executing a decision based on content of that widget
 
|-
 
|-
|[[gn:act_playSoundFromTarget]]
+
| title="Action" | <code>[[gn:act_playSoundFromTarget]]</code>
|When action is executed it plays sound from various sources
+
| title="Brief Description" | When action is executed it plays sound from various sources
 
|-
 
|-
|[[gn:act_nfcWidgetSoundChange]]
+
| title="Action" | <code>[[gn:act_nfcWidgetSoundChange]]</code>
|Changes NFC sound from default to custom when NFC tag is scanned
+
| title="Brief Description" | Changes NFC sound from default to custom when NFC tag is scanned
 
|-
 
|-
|[[gn:act_getGinstrUserNameToTarget]]
+
| title="Action" | <code>[[gn:act_getGinstrUserNameToTarget]]</code>
|After login it will retrieve currently logged in user from ginstr launcher and store it to variable
+
| title="Brief Description" | After login it will retrieve currently logged in user from ginstr launcher and store it to variable
 
|-
 
|-
|[[gn:act_startFingerprint]]
+
| title="Action" | <code>[[gn:act_startFingerprint]]</code>
|Action used to start fingerprint procedure on defined widget with fingerprint capabilities
+
| title="Brief Description" | Action used to start fingerprint procedure on defined widget with fingerprint capabilities
 
|-
 
|-
|[[gn:act_stopFingerprint]]
+
| title="Action" | <code>[[gn:act_stopFingerprint]]</code>
|Action used to stop fingerprint procedure on defined widget with fingerprint capabilities
+
| title="Brief Description" | Action used to stop fingerprint procedure on defined widget with fingerprint capabilities
 
|}
 
|}

Revision as of 15:01, 23 June 2016

All possible actions on widgets are defined here. Event type defines how an action is triggered. If an action does not have an event associated with it then it has to be nested in an action that has one in order to execute it. Action defines what will be done after trigger (event).

Actions can be categorised by the following:

  1. By an event type:
    a. Event bound 
    actions can be written like an XML attribute of a widget
    b. Not event bound 
    actions need to be part of another action executed in a set or as value of other action
  2. By database relation
    a. With database relation 
    these actions perform some task on database (query, insert, update data), and usually have “gn:data_” parameters from same or related widget.
    b. Without database relation

The table below contains a brief description of all possible actions.

Full details on each action can be found by clicking on the Action Name

Action Brief Description
gn:act_toLayoutClick,
gn:act_toLayoutLongClick,
gn:act_toLayoutSwipe
Actions that change displayed root layout to desired target
gn:act_blockBack Action that blocks going to previous screen if user presses hardware back button or executes gn:act_goLayoutBack
gn:act_goLayoutBack Returns to previous screen
gn:act_toLayoutItemSelect Opens target layout based on selected item value in selector widget
gn:act_validate Validates widget upon its content change/selection event
gn:act_validateScreen Validates entire screen when executed
gn:act_toast Displays toast message
gn:act_cleanWidgets Cleans widget of contents
gn:act_getWidgetData
(DEPRECATED)
Stores data from widgets into persistent storage
gn:act_setWidgetData
(DEPRECATED)
Retrieves widget data from persistent storage and places it into widgets
gn:act_data_write
(DEPRECATED)
Retrieves widget data in dbRequest and uses additional attributes from widget and saves data from dbRequest that is in the persistent storage into database
gn:act_update
(DEPRECATED)
Updates existing record in database with values from dbRequest
gn:act_update_values Action has all the properties of gn:act_update action with one difference. When certain column in updating row data is omitted the previously saved column value for this omitted column is kept. This action can easily append or update only certain columns keeping the rest of the row as it was.
gn:act_query Retrieves widget data in dbRequest and accesses data stored by retrieving widget data in persistent storage and making a query with it
gn:act_querySortReverseTop
(DEPRECATED)
Identical to gn:act query, except for this query returns the sorted query by some key, after sorting it returns only the top row of result if multiple results are returned.
gn:act_queryWiFiFingerprint This query returns all data for specific user from table which contains WiFi fingerprint values, with dbRequest defined in dbSchema. After the data is retrieved, this action will then compare current WiFi fingerprint with all records, it will return value from row with the closest WiFi fingerprint and sets the defined field value into target widget.
gn:act_queryGSMFingerprint This query returns all data for specific user from table which contains GSM fingerprint values, with dbRequest defined in dbSchema. After the data is retrieved, this action will then compare current GSM fingerprint with all records, it will return value from row with the closest GSM fingerprint and sets the defined field value into target widget.
gn:act_queryBTFingerprint This query returns all data for specific user from table which contains Bluetooth fingerprint values, with dbRequest defined in dbSchema. After the data is retrieved, this action will then compare current Bluetooth fingerprint with all records, it will return value from row with the closest Bluetooth fingerprint and sets the defined field value into target widget.
gn:act_fill_dropdown Action queries a data table based on attributes and then it sets data into widget using an integrated action gn:act_setWidgetData.
gn:act_queryItemSelect The action is used specifically on the dropdown widget. When an action is triggered on a widget that binds (contains) this action, its value is used to perform a query on another table. When a result is obtained it populates the target widget which is set as an attribute value of this action with data from the query.
gn:act_toLayoutClickDbVal An action look up in provided dbRequest table (table has to have one row) value that is defined by gn:data_dbValRefKey=”field”.
gn:act_cleanData
(DEPRECATED)
This action clears dbRequest that is defined in bound widget attributes. It performs a clean on dbRequests that contains only one row of data.
gn:act_if Special action that acts as a conditional action. It accepts other actions as conditions and other actions that are defined to execute if condition was true or if it was false. If all conditions are true action will execute true block of actions, if any condition is false action will execute false block of actions.
gn:act_table_exists Action checks if a table exists. If a table exists it returns true, otherwise it returns false.
gn:act_table_create Action that creates table.
gn:act_hideWidgets Action that hides widgets on the screen. It can be used to hide one or more or all widgets on the screen.
gn:act_showWidgets Action that shows widgets on the screen. It can be used to show one or more or all widgets on the screen.
gn:act_isChecked Action that returns if GnCheckbox widget is checked or not. It can be used with gn:act_if to create behaviour if a widget is checked do a certain behaviour or otherwise do a different behaviour depending on the use case.
gn:act_hideKeyboard Action that hides keyboard.
gn:act_hasTableRights Action that returns if logged in user has rights to specific table or not. To be used only after user has passed login at GnLogin widget
gn:act_setSelectedItem Dropdown has to contain data before setSelectedItem is used. This action selects dropdown item GnDropDown. The action has to be declared at GnDropDown widget on which item will be selected in an action set.
gn:act_copyData Copies content from source widget to destination widget.
gn:act_widgetContent Checks content of a widget and compares it with keyword. This is useful for business logic checks depending on some result or data in some widget, field
gn:act_widgetContentJoin Takes content of multiple widgets and joins the content and stores it into target EditText or GnEditText.
gn:act_joinTextualValues Takes content of multiple widgets, joins the text content separated by separator value and stores it into the target.
gn:act_lockScreenOrientation Locks screen orientation to desired orientation. Setting lock on orientation will keep the lock until the application is turned off. To remove the lock or switch it to another orientation action needs to be used again with different keyword
gn:act_reloadAutoFilledWidgets Reloads GnEditText widgets that have special ability to autoload data
gn:act_calculate Performs calculation operations on different actors and stores result in target
gn:act_break Action is used to prevent further execution
gn:act_convertTimestampToFormat Action is used to convert timestamp (numerical value) from certain widget to human readable format.
gn:act_trigger Action is used to trigger any action set on a different widget
gn:act_resetChrono Action is used to reset the chronometer time to 0
gn:act_startChrono Action is used to start the chronometer to measure time
gn:act_stopChrono Action is used to stop (pause) the chronometer time measuring
gn:act_setChrono Action sets chronometer to certain start time
gn:act_debug_dbrequest Action will dump content of dbRequest into folder $debug in currently used application root directory
gn:act_debug Action will dump content of any action that has logging into folder $debug in currently used application root directory
gn:act_setViewState Action will change the state of any widget
gn:act_copyDataFromRow Action will copy data from selected row from GnlistView widget to some other widget outside of GnListView widget.
gn:act_showDialog Action used to display a popup dialog
gn:act_showDateTimeDialog Action used to display a datetime dialog
gn:act_setSrcImage Action used to change image drawable for specified ImageView or GnImageView widget.
gn:act_smsSend Action used to send an SMS message to multiple recipients
gn:act_gmailSend Action used to send an email message to multiple recipients
gn:act_showSingleChoiceDialog Action used to display a single choice dialog
gn:act_showProgressDialog Action used to display a progress dialog
gn:act_hideProgressDialog Action used to hide visible progress dialog
gn:act_changeProgressDialog Action used to change a value of progress dialog
gn:act_showYesNoDialog Action used to display yes, no dialog, with custom title, message , and buttons text
gn:act_enableWidget Action enables widgets for user interaction
gn:act_disableWidget Action disables widgets for user interaction
gn:act_performClick Performs a click action on targeted widget
gn:act_getDbRequestRowCount
(DEPRECATED)
Gets numbers of rows loaded into dbRequest and stores it to target widget
gn:act_isDbRequestMiddleRow
(DEPRECATED)
Used in if action to control the action flow. Returns true or false to check if current dbRequest row is in the middle of the set
gn:act_isDbRequestLastRow
(DEPRECATED)
Used in if action to control the action flow. Returns true or false to check if current dbRequest row is at end of the set
gn:act_widgetIncreaseCounter When action is executed it adds +1 to number stored in @+id/targetWidget
gn:act_widgetDecreaseCounter When action is executed it subtracts -1 from number stored in @+id/targetWidget
gn:act_rawQueryToWidget Action is used to query data from database and store value to a target
gn:act_rawQueryToWidgets Action is used to query data from database from multiple columns and store value to multiple targets
gn:act_rawQueryByRangeToDbRequest
(DEPRECATED)
Action is used to query data from database from multiple columns and store value dbRequest
gn:act_rawUpdateValues Action is used to update data from sources (widgets, variables, resources,...) to database record.
gn:act_loadPointer Loads value for widget which contains pointer Id
gn:act_scrollTo Automatic scrolling is executed to certain widget on screen
gn:act_getVariableToWidget Loads value of variable from memory and stores it into target
gn:act_setVariable Loads value from target and stores it to variable
gn:act_resetVariables Resets memory value holders for variables to definedValue values
gn: act_setTimestampToVar Loads special timestamp values to variable which are defined by keywords, or hardcoded value.
gn:act_copyDropdownSelectedArrayValue Action is used to retrieve dropdown selected value from array value string-array into target widget.
gn:act_rawWriteValues Action is used to write data into database table
gn:act_blinkView Makes a view blink in specific intervals on screen
gn:act_callPhone Performs phone call when action is executed
gn:act_sendEmail Sends email when action is executed
gn:act_rawBulkUpdateValues Updates values to database on multiple rows that are stored in widgets that contain multiple rows , such as ListView
gn:act_updateLstRowColumnFromWidget Updates value held in widget with rows, row column by value from widget.
gn:act_isIdenticalFile Action that compares if file that is stored on device is identical to file information last stored about the file
gn:act_storeFileInfo Action that stores information about file internally. This information is later used by gn:act_isIdenticalFile action.
gn:act_rawQueryCountToTarget Executes query counts the rows returned and stores result into a target
gn:act_saveToVariable Stores value variable in variables.xml file from target. Values that are stored in variables.xml are loaded into variables on startup of the ginstr application
gn:act_updateUIbreak Breaks execution of the action block if a content update is necessary. The scenario to use this action is when setting some value in same action block into certain widget and in same block executing a decision based on content of that widget
gn:act_playSoundFromTarget When action is executed it plays sound from various sources
gn:act_nfcWidgetSoundChange Changes NFC sound from default to custom when NFC tag is scanned
gn:act_getGinstrUserNameToTarget After login it will retrieve currently logged in user from ginstr launcher and store it to variable
gn:act_startFingerprint Action used to start fingerprint procedure on defined widget with fingerprint capabilities
gn:act_stopFingerprint Action used to stop fingerprint procedure on defined widget with fingerprint capabilities