8.2.3. datastore

8.2.3.1. description

The datastore is a Genro Bag used to keep track of data

8.2.3.2. datastore syntax

The path followed by the syntax in the datastore:

  • path –> absolute path in datastore
  • .path –> relative path in datastore
  • #ID –> path relative to the ID

The path indicates the access path to data to every element of the datastore (it is implemented by reading the Bag interface, and thus includes many things: for example, you can also specify the CSS classes of an HTML element linking them to an element of the datastore), using the prefixes:

  • “^” (circumflex accent): ^access.to.resolver, setting an observer at this node. The component will be informed of changes to the datastore
  • equal: =accessed.from.resolver, reads the datastore content.

For more information on absolute and relative paths, check the datapath page.

8.2.3.3. javascript datastore access

The possible operations on the datastore include some macros (like SET and GET)

They can be specified in the javascript events associated with an interface, and the framework deals gnrjs to the expansion of these macros

8.2.3.4. inspector

We call “inspector” the graphic interface of the datastore.

You can access it directly from your browser when you are in a webpage by clicking ctrl+shift+D:

The inspector

../_images/datastore.png