From wiki.ginstr.com
Revision as of 15:03, 23 June 2016 by Mark (talk | contribs)
Jump to: navigation, search

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