A toolset of useful Mendix stuff commonly shared between multiple projects like Java Actions and JavaScript Actions.
To use, export desired module from this project and import to your own.
Depends on modules:
- CommunityCommons
- OQL
- CSV
Mendix version: 9.24.3.
  1.1 ClientAPI
  1.2 CSV
  1.3 DataGrid
  1.4 DOM
  1.5 JSON
  1.6 List
  1.7 Misc
  1.8 ORM
  1.9 String
  1.10 URL
Checks whether current page name equals provided value.
Retrieves current user session.
Returns currentUser object cast to User entity without performing server call.
This action checks whether current user has role with provided role name.
Safer alternative for ReadNextLine from CSV module. This one is more safe: the original one throws an exception if the result entity has more attributes than file columns.
Reads a next line from a CSV - and returns an entity of the configured type. This action should only be invoked from the microflow used by a ImportCSV action. If the action returns an empty entity, the end of the file is reached.
An alternative for ReadNextLine from CSV module. This one is more dynamic: doesn't require declaring a result entity with columns mapped as attributes.
Reads a next line from a CSV - and returns a List of StringDTO. This action should only be invoked from the microflow used by a ImportCSV action. If the action returns an empty list, the end of the file is reached.
Safer alternative for WriteNextLine from CSV module. This one is more safe: the original one throws an exception if the entity has more attributes than file columns.
Writes all (configured) attribute values from the entity as column values of CSV row. This action should only be invoked from the microflow used by a ExportCSV action. All attribute vales will be exported as Strings (using toString()); thus specific parsing should be part of the microflow.
An alternative for WriteNextLine from CSV module. This one is more dynamic: doesn't require declaring an entity with columns mapped as attributes.
Writes all values from the List of StringDTO as column values of CSV row. This action should only be invoked from the microflow used by a ExportCSV action.
Tools for DataGrid 1.0 widget.
Gets current caret position in the edited text.
Sets current caret position in the edited text.
Removes class from elements with given selector.
Sets innerHTML attribute of HTML element.
Removes focus from element with given selector
Provides keyboard navigation events on list view items
Generates a list of KeyValue objects from input JSON array. Each array element is represented as a single chosen attribute (key/value pair) mapped to Mendix object indexed with an order number.
Generates a list of KeyValueContainer objects from input JSON array. Each array element is represented as a single KeyValueContainer object with associated collection of KeyValue objects. Each KeyValue object represents a single attribute (key/value pair) of its parent object. Additionally, the KeyValueContainer objects hold a single attribute ('id' recommended for most use cases) for easier identification. The attribute will be duplicated in the associated KeyValue object.
Returns a string containing extracted value from provided JSON object.
Generates a list of attributes for provided JSON object as a KeyValue list.
See JavaScript: JSON.stringify
See JavaScript: JSON.stringify
Returns copy of Input list with distinct values (for the given Attribute): duplicates are ignored.
Maps source list into target list using simple get/set logic: get value from SourceAttribute (from source entity) and set it to TargetAttribute (to target entity).
Expects list of Mendix Objects as a parameter and returns list of same elements with randomized order.
Returns a sublist of a given list. Elements from start index (offset) to the end index (amount + offset) are taken. If offset is not given, then default value is assumed - 0. If the end index exceeds the bounds of the list, then all remaining elements are returned.
JS version of ListTake. Returns a sublist of a given list. Elements from start index (offset) to the end index (amount + offset) are taken. If offset is not given, then default value is assumed - 0. If the end index exceeds the bounds of the list, then all remaining elements are returned.
Logs out current user.
Clones objects fully - all attributes and associations
- Source: the original object to copy
- Target: the object to copy it into (should be of the same type, or a specialization)
System attributes are ignored.
Copy of Community Commons commitInSeparateDatabaseTransation Java action.
This action performs commit without events
Returns value of the named attribute for the provided object as a string.
Enhanced version of CommunityCommons.getTypeAsString: ignoreModuleName param added.
Returns the actual type of an Entity. Useful as alternative way to split upon inheritance, or as input of other functions in this module.
Retrieve an object of the provided type by GUID.
Similiar to ExecuteOQLStatement, but returns data serialized in JSON format.
Allows execution of SQL Select statement in order to return MxObjects.
Executes the SQL statement, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
Returns either the row count for SQL Data Manipulation Language (DML) statements or 0 for SQL statements that return nothing.
Similar to normal Retrieve (from DB) activity, enhanced with:
- Simplified Pagination
- Dynamic Sorting.
RetrieveEnhanced which returns total number of returned rows.
Similiar to RetrieveEnhanced. Returns objects that are associated to objects from the source list.
Similiar to RetrieveEnhanced. Returns NumericValue objects for each selected object by XPath. Useful for Id retrieval.
Returns substring between OpeningTag and ClosingTag - or empty if >= 1 of tags is missing.
Counts number of occurences of Separator in the given input String.
See: JamCommons: StringJoin Java: String.join JavaScript: Array.join
See: JamCommons: StringJoin Java: String.join JavaScript: Array.join
Same as StringJoin_JS, but getting the string value to join from each entity is different: calls the given NANOFLOW instead of an ATTRIBUTE. The nanoflow should accept the entity as param, and return string as result.
Having example input List: [{Key:"id", Value:"1"}, {Key:"name", Value:"name1"}] and Separator = ", " and Template = "{Key}: {Value}" result is: "id: 1, name: name1"
Full implementation of Java String.replaceAll()
Stronger then Mendix replaceAll/First() string functions: the replacement patterns are supported.
Full implementation of JS String.replace()
Stronger then Mendix replaceAll/First() string functions: the replacement patterns are supported.
See: CommunityCommons: StringSplit JamCommons: StringSplit Java: String.split JavaScript: String.split
The splitting result is returned as list of StringValue objects.
See: CommunityCommons: StringSplit JamCommons: StringSplit Java: String.split JavaScript: String.split
The splitting result is returned as list of StringValue objects.
Mendix wrapper for Java for URLEncoder.encode method. Encodes in UTF-8 format.
See: https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html
Opens the provided URL in the web browser.
Module with useful tools for Tag Selector widget.
Module that is an extension of SignIn microflow widget. This extension adds two separate microflows:
- SignIn_Before: called AFTER user provides credentials and clicks Sign-in button, but BEFORE triggering sign-in logic. It is a good place e.g. for Accounts provisioning.
- SignIn_After: called when anonymous user signs in. Currently, both MFs do nothing but logging, but you can overwrite their content.
This module provides management for data migrations often required during development.