You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

current

The current keyword returns the object returned by URI Object Resolution, if available.

Search results for "current"

current

The current keyword returns the object returned by URI Object Resolution, if available.

Aggregate

The Aggregate element is used to aggregate data within loops in the Flow Engine. It works similar like reduce functions in other languages. In it’s scripting context the keywords data and currentData become available. Data represents the initial value for the aggregation and currentData contains the dataset of the current loop iteration. The script must then process and return the aggregation result and in the next iteration data will contain the result of the previous aggregation.

About Me

The About Me section displays information about the user that is currently logged in to the system.

ID The UUID of the user.
E-Mail The E-Mail address of the user.
Working Directory The directory in Structr’s virtual file system that the user is currently visiting. This is also the directory where files uploaded via the Structr upload servlet will be uploaded (if no upload path is provided).
Session ID(s) A collection of the current session IDs of the user.
Groups The list of user groups the user is a member of.

In addition to these information, Structr also stores the UI preferences of the logged-in user. They can be reset by clicking on “Reset stored UI settings”.

About Structr

The About Structr section lists the information about the current Structr system and the installed license.

Version The installed version of the Structr software. The format is release build-commit build-time.
Edition The installed edition of Structr (Community or Enterprise).
Modules The available modules of the installed license. When the edition is Community the base modules core, rest and ui are enabled by default.
Licensee The licensee of the active license.
Host ID The unique ID of the hardware system the Structr software runs on. The host ID is used to restrict a license to one system. It is calculated by different hardware-specific information like the enabled network interfaces. The host ID will change if the hardware configuration changes and invalidate the license. In this case, you need to obtain a new license for the new host ID.
License Start Date Start date of the active license.
License End Date End date of the active license.
Database Driver Currently supported databases include Neo4j Bolt, In-Memory and Memgraph.

Page Title

The system keyword page references the current page. The page has several properties, including a name attribute which can be accessed with the dot notation (page.name), similar to other programming languages such as JavaScript. Summarized, the template expression computes the current page, retrieves its name and it transforms the first character into uppercase. The result is then rendered as the page’s title.

Layouts

This is simply a visual helper to bring order to the types on the canvas - it has no effect other than that.

Updating and Deleting Configurations is only allowed for saved layouts the current user owns or for those without an owner. Applying and downloading works for all saved layouts to enable sharing between users.

Layouts contain the current settings for relationship rendering, zoom, relationship labels, type placement and type visibility.

Aggregate

Name Description
Prev Accepts another element’s Next socket
Next Connects to another element’s Prev socket
CurrentData Accepts another element’s DataSource. Given data is made available as currentData within the scripting context.
Data Accepts another element’s DataSource. Given data is start value of the aggregation and used to set it’s initial value.
DataTarget Connects to another element’s DataSource socket. Contains the aggregated data of the element.
ExceptionHandler If connected to an ExceptionHandler, exceptions thrown in the scripting context will be handled by the referenced handler.
Script context used to aggregate the data. Return value will be written to the element’s data.

Template Expressions

In addition to the built-in functions provided by the scripting environment, Structr introduces a set of predefined keywords in the template elements that allow access to data in the current context, for example the logged on user, the current page, or any existing request parameters.

Menu Bar

The menu bar above the canvas area provides shortcuts to some of the functionality that can be found in the context-menu of the canvas. The input field and “Add” button allow the creation of new Flows and the adjacent “Delete Flow” button deletes the currently active Flow. The Flow layout manager can be opened using the “Layout” button and the current view position and scale can be reset using the “Reset view” button. Lastly the active Flow can be run using the “Run” button. The result will be displayed in a popup in the top-right corner of the Flow area.

Application Configuration

security.twofactorauthentication.loginpage

The application page where the user enters the current two factor token. Until the user has verified his two factor token (by logging in once), the user is shown a QR code after every login attempt. Default is /twofactor

Kubernetes / Helm

Please note that you need to set up Neo4j separately. You can use the official Neo4j Helm charts, go to https://neo4j.com/docs/operations-manual/current/kubernetes/helm-charts-setup/ and follow the instructions there.

Simple Data Model

Currently our overview page contains a static table that was handcrafted by us. To populate the page, and in particular the table, with data from our database, we need a data model (also called schema) which describes the type and structure of the information we handle in our application. To do this, we head over to the Schema area by clicking on (Schema tab) in the main menu.

Log

The Log element allows to write to the Structr log. It will additionally prefix the given message content with the current flow name and the log element’s UUID.

Store

The Store element is a two way data storage element used to store or retrieve data within the current flow’s context.

Data Binding

The Page Rendering Engine allows developers to create dynamic markup elements by binding a scripting expression or database query to an element in the markup tree. A dynamic markup element is called a repeater. It is rendered to the output stream once for each object in the query or function result collection and will be displayed including its substructure. The current element can be accessed through a keyword, the so-called data key. The data key is valid in the entire subtree within the repeater element and can also be referenced in content nodes, templates or element attributes.

Add Page Content

Having set the page’s title, let’s now add some content to the page body element. <body> currently contains a <div> element which contains a content element with the text “Initial body text”.

Loop

Name Description
Prev Accepts another element’s Next socket
Next Connects to another element’s Prev socket
DataSource Accepts another element’s DataSource. Represents the collection to iterate.
DataTarget Accepts another element’s DataSource. Contains the object of the current iteration.
FirstAction Connects to another element’s Prev socket. Represents the first node to be called for each iteration of the collection.