From wiki.ginstr.com
Jump to: navigation, search
(Redirected page to Category:Action Library)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Actions]]
+
#REDIRECT [[:Category:Action_Library]]
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:
 
#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
 
#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.
 
#:;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
 
 
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
! scope="col" | Action
 
! scope="col" | Brief Description
 
|-
 
| title="Action" | <code>[[gn:act_toLayoutClick]]</code>,<br><code>[[gn:act_toLayoutLongClick]]</code>,<br><code>[[gn:act_toLayoutSwipe]]</code>
 
| title="Brief Description" | Actions that change displayed root layout to desired target
 
|-
 
| title="Action" | <code>[[gn:act_blockBack]]</code>
 
| title="Brief Description" | Action that blocks going to previous screen if user presses hardware back button or executes <code>[[gn:act_goLayoutBack]]</code>
 
|-
 
| title="Action" | <code>[[gn:act_goLayoutBack]]</code>
 
| title="Brief Description" | Returns to previous screen
 
|-
 
| title="Action" | <code>[[gn:act_toLayoutItemSelect]]</code>
 
| title="Brief Description" | Opens target layout based on selected item value in selector widget
 
|-
 
| title="Action" | <code>[[gn:act_validate]]</code>
 
| title="Brief Description" | Validates widget upon its content change/selection event
 
|-
 
| title="Action" | <code>[[gn:act_validateScreen]]</code>
 
|Validates entire screen when executed
 
|-
 
| title="Action" | <code>[[gn:act_toast]]</code>
 
| title="Brief Description" | Displays toast message
 
|-
 
| title="Action" | <code>[[gn:act_cleanWidgets]]</code>
 
| title="Brief Description" | Cleans widget of contents
 
|-
 
| title="Action" | <code>[[gn:act_getWidgetData]]</code><br>(DEPRECATED)
 
| title="Brief Description" | Stores data from [[widgets]] into persistent storage
 
|-
 
| title="Action" | <code>[[gn:act_setWidgetData]]</code><br>(DEPRECATED)
 
| title="Brief Description" | Retrieves widget data from persistent storage and places it into [[widgets]]
 
|-
 
| title="Action" | <code>[[gn:act_data_write]]</code><br>(DEPRECATED)
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_update]]</code><br>(DEPRECATED)
 
| title="Brief Description" | Updates existing record in database with values from <code>dbRequest</code>
 
|-
 
| title="Action" | <code>[[gn:act_update_values]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_query]]</code>
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_querySortReverseTop]]</code><br>(DEPRECATED)
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_queryWiFiFingerprint]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_queryGSMFingerprint]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_queryBTFingerprint]]</code>
 
|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.
 
|-
 
| title="Action" | <code>[[gn:act_fill_dropdown]]</code>
 
| 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>.
 
|-
 
| title="Action" | <code>[[gn:act_queryItemSelect]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_toLayoutClickDbVal]]</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>.
 
|-
 
| title="Action" | <code>[[gn:act_cleanData]]</code><br>(DEPRECATED)
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_if]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_table_exists]]</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>.
 
|-
 
| title="Action" | <code>[[gn:act_table_create]]</code>
 
| title="Brief Description" | Action that creates table.
 
|-
 
| title="Action" | <code>[[gn:act_hideWidgets]]</code>
 
| 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.
 
|-
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_isChecked]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_hideKeyboard]]</code>
 
| title="Brief Description" | Action that hides keyboard.
 
|-
 
| title="Action" | <code>[[gn:act_hasTableRights]]</code>
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_setSelectedItem]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_copyData]]</code>
 
| title="Brief Description" | Copies content from source widget to destination widget.
 
|-
 
| title="Action" | <code>[[gn:act_widgetContent]]</code>
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_widgetContentJoin]]</code>
 
| title="Brief Description" | Takes content of multiple [[widgets]] and joins the content and stores it into target <code>[[EditText]]</code> or <code>[[GnEditText]]</code>.
 
|-
 
| title="Action" | <code>[[gn:act_joinTextualValues]]</code>
 
| title="Brief Description" | Takes content of multiple [[widgets]], joins the text content separated by separator value and stores it into the target.
 
|-
 
| title="Action" | <code>[[gn:act_lockScreenOrientation]]</code>
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_reloadAutoFilledWidgets]]</code>
 
| title="Brief Description" | Reloads <code>[[GnEditText]]</code> widgets that have special ability to autoload data
 
|-
 
| title="Action" | <code>[[gn:act_calculate]]</code>
 
| title="Brief Description" | Performs calculation operations on different actors and stores result in target
 
|-
 
| title="Action" | <code>[[gn:act_break]]</code>
 
| title="Brief Description" | Action is used to prevent further execution
 
|-
 
| title="Action" | <code>[[gn:act_convertTimestampToFormat]]</code>
 
| title="Brief Description" | Action is used to convert timestamp (numerical value) from certain widget to human readable format.
 
|-
 
| title="Action" | <code>[[gn:act_trigger]]</code>
 
|Action is used to trigger any action set on a different widget
 
|-
 
| title="Action" | <code>[[gn:act_resetChrono]]</code>
 
| title="Brief Description" | Action is used to reset the chronometer time to 0
 
|-
 
| title="Action" | <code>[[gn:act_startChrono]]</code>
 
|Action is used to start the chronometer to measure time
 
|-
 
| title="Action" | <code>[[gn:act_stopChrono]]</code>
 
| title="Brief Description" | Action is used to stop (pause) the chronometer time measuring
 
|-
 
| title="Action" | <code>[[gn:act_setChrono]]</code>
 
| title="Brief Description" | Action sets chronometer to certain start time
 
|-
 
| title="Action" | <code>[[gn:act_debug_dbrequest]]</code>
 
| title="Brief Description" | Action will dump content of <code>dbRequest</code> into folder '''$debug''' in currently used application root directory
 
|-
 
| title="Action" | <code>[[gn:act_debug]]</code>
 
| title="Brief Description" | Action will dump content of any action that has logging into folder $debug in currently used application root directory
 
|-
 
| title="Action" | <code>[[gn:act_setViewState]]</code>
 
| title="Brief Description" | Action will change the state of any widget
 
|-
 
| title="Action" | <code>[[gn:act_copyDataFromRow]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_showDialog]]</code>
 
| title="Brief Description" | Action used to display a popup dialog
 
|-
 
| title="Action" | <code>[[gn:act_showDateTimeDialog]]</code>
 
| title="Brief Description" | Action used to display a datetime dialog
 
|-
 
| title="Action" | <code>[[gn:act_setSrcImage]]</code>
 
| 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.
 
|-
 
| title="Action" | <code>[[gn:act_smsSend]]</code>
 
| title="Brief Description" | Action used to send an SMS message to multiple recipients
 
|-
 
| title="Action" | <code>[[gn:act_gmailSend]]</code>
 
| title="Brief Description" | Action used to send an email message to multiple recipients
 
|-
 
| title="Action" | <code>[[gn:act_showSingleChoiceDialog]]</code>
 
| title="Brief Description" | Action used to display a single choice dialog
 
|-
 
| title="Action" | <code>[[gn:act_showProgressDialog]]</code>
 
| title="Brief Description" | Action used to display a progress dialog
 
|-
 
| title="Action" | <code>[[gn:act_hideProgressDialog]]</code>
 
| title="Brief Description" | Action used to hide visible progress dialog
 
|-
 
| title="Action" | <code>[[gn:act_changeProgressDialog]]</code>
 
| title="Brief Description" | Action used to change a value of progress dialog
 
|-
 
| title="Action" | <code>[[gn:act_showYesNoDialog]]</code>
 
| title="Brief Description" | Action used to display yes, no dialog, with custom title, message , and buttons text
 
|-
 
| title="Action" | <code>[[gn:act_enableWidget]]</code>
 
| title="Brief Description" | Action enables [[widgets]] for user interaction
 
|-
 
| title="Action" | <code>[[gn:act_disableWidget]]</code>
 
| title="Brief Description" | Action disables [[widgets]] for user interaction
 
|-
 
| title="Action" | <code>[[gn:act_performClick]]</code>
 
| title="Brief Description" | Performs a click action on targeted widget
 
|-
 
| title="Action" | <code>[[gn:act_getDbRequestRowCount]]</code><br>(DEPRECATED)
 
| title="Brief Description" | Gets numbers of rows loaded into <code>dbRequest</code> and stores it to target widget
 
|-
 
| title="Action" | <code>[[gn:act_isDbRequestMiddleRow]]</code><br>(DEPRECATED)
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_isDbRequestLastRow]]</code><br>(DEPRECATED)
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_widgetIncreaseCounter]]</code>
 
| title="Brief Description" | When action is executed it adds +1  to number stored in <code>@+id/targetWidget</code>
 
|-
 
| title="Action" | <code>[[gn:act_widgetDecreaseCounter]]</code>
 
| title="Brief Description" | When action is executed it subtracts -1 from number stored in <code>@+id/targetWidget</code>
 
|-
 
| title="Action" | <code>[[gn:act_rawQueryToWidget]]</code>
 
| title="Brief Description" | Action is used to query data from database and store value to a target
 
|-
 
| title="Action" | <code>[[gn:act_rawQueryToWidgets]]</code>
 
| title="Brief Description" | Action is used to query data from database from multiple columns and store value to multiple targets
 
|-
 
| title="Action" | <code>[[gn:act_rawQueryByRangeToDbRequest]]</code><br>(DEPRECATED)
 
| title="Brief Description" | Action is used to query data from database from multiple columns and store value <code>dbRequest</code>
 
|-
 
| title="Action" | <code>[[gn:act_rawUpdateValues]]</code>
 
| title="Brief Description" | Action is used to update data from sources ([[widgets]], variables, resources,...) to database record.
 
|-
 
| title="Action" | <code>[[gn:act_loadPointer]]</code>
 
| title="Brief Description" | Loads value for widget which contains pointer Id
 
|-
 
| title="Action" | <code>[[gn:act_scrollTo]]</code>
 
| title="Brief Description" | Automatic scrolling is executed to certain widget on screen
 
|-
 
| title="Action" | <code>[[gn:act_getVariableToWidget]]</code>
 
| title="Brief Description" | Loads value of variable from memory and stores it into target
 
|-
 
| title="Action" | <code>[[gn:act_setVariable]]</code>
 
| title="Brief Description" | Loads value from target and stores it to variable
 
|-
 
| title="Action" | <code>[[gn:act_resetVariables]]</code>
 
| title="Brief Description" | Resets memory value holders for variables to <code>definedValue</code> values
 
|-
 
| title="Action" | <code>[[gn: act_setTimestampToVar]]</code>
 
| title="Brief Description" | Loads special timestamp values to variable which are defined by keywords, or hardcoded value.
 
|-
 
| title="Action" | <code>[[gn:act_copyDropdownSelectedArrayValue]]</code>
 
| title="Brief Description" | Action is used to retrieve dropdown selected value from array value string-array into target widget.
 
|-
 
| title="Action" | <code>[[gn:act_rawWriteValues]]</code>
 
| title="Brief Description" | Action is used to write data into database table
 
|-
 
| title="Action" | <code>[[gn:act_blinkView]]</code>
 
| title="Brief Description" | Makes a view blink in specific intervals on screen
 
|-
 
| title="Action" | <code>[[gn:act_callPhone]]</code>
 
| title="Brief Description" | Performs phone call when action is executed
 
|-
 
| title="Action" | <code>[[gn:act_sendEmail]]</code>
 
| title="Brief Description" | Sends email when action is executed
 
|-
 
| title="Action" | <code>[[gn:act_rawBulkUpdateValues]]</code>
 
| 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>
 
|-
 
| title="Action" | <code>[[gn:act_updateLstRowColumnFromWidget]]</code>
 
| title="Brief Description" | Updates value held in widget with rows, row column by value from widget.
 
|-
 
| title="Action" | <code>[[gn:act_isIdenticalFile]]</code>
 
| title="Brief Description" | Action that compares if file that is stored on device is identical to file information last stored about the file
 
|-
 
| title="Action" | <code>[[gn:act_storeFileInfo]]</code>
 
| title="Brief Description" | Action that stores information about file internally. This information is later used by <code>[[gn:act_isIdenticalFile]]</code> action.
 
|-
 
| title="Action" | <code>[[gn:act_rawQueryCountToTarget]]</code>
 
| title="Brief Description" | Executes query counts the rows returned and stores result into a target
 
|-
 
| title="Action" | <code>[[gn:act_saveToVariable]]</code>
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_updateUIbreak]]</code>
 
| 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
 
|-
 
| title="Action" | <code>[[gn:act_playSoundFromTarget]]</code>
 
| title="Brief Description" | When action is executed it plays sound from various sources
 
|-
 
| title="Action" | <code>[[gn:act_nfcWidgetSoundChange]]</code>
 
| title="Brief Description" | Changes NFC sound from default to custom when NFC tag is scanned
 
|-
 
| title="Action" | <code>[[gn:act_getGinstrUserNameToTarget]]</code>
 
| title="Brief Description" | After login it will retrieve currently logged in user from ginstr launcher and store it to variable
 
|-
 
| title="Action" | <code>[[gn:act_startFingerprint]]</code>
 
| title="Brief Description" | Action used to start fingerprint procedure on defined widget with fingerprint capabilities
 
|-
 
| title="Action" | <code>[[gn:act_stopFingerprint]]</code>
 
| title="Brief Description" | Action used to stop fingerprint procedure on defined widget with fingerprint capabilities
 
|}
 

Latest revision as of 09:45, 30 June 2016