Metrici pages

Node pages

Each node version in the node store is represented by a page on Metrici.

The URL of the page is built by replacing the dots in the node reference with slashes.

For example, the node version library.core.PageType.1 is available at

The version number is optional. If omitted, the latest version will be shown.


Each section on a page has an id attribute the same as the node version reference of the member type that it represents. This can be used as a bookmark to jump to a specific section of the page. For example, the following URL would jump straight to the tag list of the page type:

File extensions

Page URLs can optionally contain a file extension. If a version number is present, the extension is given after the version number.

For example, the node version library.core.PageType.1 is also available at

File extensions are ignored by Metrici, except when serving Files.

Node methods

Each node is associated with a number of methods. The methods are accessed by appending


To the end of the URL.

The methods are listed in the navigation menu, together with other more general features such as search and permissions.

The main methods are edit and new, which allow edit of the current node, and which create a new node using the current node as a type.

Edit and new

By default, the new method is run from node type pages.

The new methods can also be invoked directly from the URL. This allows additional options to be set:

  • Initial data. This is passed using parameters to the SetNode method using XPath conventions.
  • Where to return if the creation is successful and the edit page is saved, or if edit is cancelled, using parameters closeRedirectURL and cancelRedirectURL respectively. cancelRedirectURL defaults to closeRedirectURL. These URLs can be absolute, relative to rootPath, or be prefixed by The default close URL is the newly created page, and the default cancel URL is the type node.
  • Where navigation components such as banner menus are being used, the parameter context can be set to a node version reference to indicate the logical position of the node within the package hierarchy. This is useful for new processing, for example to specify something like "Create a new assessment, but show the menus for the assessment package not the assessment type". This is also required for nodes that are created by linked users where the types may be available through another linked account or to the anonymous user (or, more simply, always add the context parameter if your application might have more than once instance and is used by linked users).

An an example, the URL below is to create a new page using library.core.PageType, setting the package to somecompany.pages, the local reference to myPage and the name to "My Page". If the user presses cancel, take them back to the page somecompany/home.

The edit method supports closeRedirectURL and cancelRedirectURL.

The new method additionally supports a "parent node", which is a node in which a link to the new node will be created. To use this feature, add the parameters ParentNodeSection/nodeVersionReferenceParent and ParentNodeSection/nodeVersionReferenceMemberTypeParent to specify the parent node and the member type for the link, respectively.

Copy and move

Copy and move also support closeRedirectURL and cancelRedirectURL.


Like edit and new, the node delete UI can be passed a deleteRedirectURL and a deleteCancelRedirectURL. These can be passed when the method is delete_confirm or delete.

Sign on

To sign on to Metrici programatically, redirect to

The domain name can be any Metrici domain name.

The redirectURL is optional - if not given then the user is taken to their home node.

The redirect URL is relative to app/sign_on.jsp, so node URLs should start with ../

signOnURL is optional, and provides a page to send the user to if sign on does not work. This can be useful for temporary sign ins which users may attempt to use after they have timed out. Similar functionality is built in to session tokens.

Sign off can also use signOnURL, and the user will be redirected to this page to sign on again.

Remember to escape special codes in the redirect URL, such as ? and =.


The node search page is available at

The node search page can be invoked to show a particualar by passing the parameter searchStringNode.

For example

Will list all the nodes in the somecompany.pages package. (The trailing "." means that the package itself is not listed).


The page returned from links (<a> tags) and forms (<form> tags) with a class of popup will be shown in a popup.

Once in a popup:

  • Linked-to pages will continue to be shown in the popup, unless they have the class nopopup.
  • Outputs from the form will be shown in the popup.
  • Redirects will not be in a popup, unless they have the parameter popup=retain in their query string.


Metrici supports two standard placeholders for output text, which are replaced as follows:

  • ${rootPath} – replace with the root path, i.e. path to root of application.
  • ${nodeURL} – for node pages, replace with the URL of the node.

For incoming parameters, Metrici supports an additional placeholder that must form the entirety of the parameter:

  • ${referer} – replace with the referer value from the HTML header. This may be stripped from a URL by the content cleaning process, use the escaped version %24%7Breferer%7D.

Form handling

Forms are disabled once they are submitted, to prevent the user pressing submit twice. After a short delay, a "busy" overlay is added to the page to show the user what is happening.

The class "submit-multiple" can be added to a submit button to allow the user to submit the form multiple times. This is used for submit buttons that then redirect to a file download, and which do not need to disable the form.


The transaction patttern is a way of using nodes to solicit user input and then perform some action. The node used to solicit the user input is typically deleted at the end of the transaction.

A transaction can be run against a node by using ?method=transaction. The transaction type to use is identified by its node version reference using the parameter nodeVersionReferenceType. This instantiates the transaction type, and sets the context, and close and cancel redirect to return to the node.

If the type uses the Context (system.CONTEXT) member type, it will be populated with the node from which the transaction was run.

If the type uses the Node List (system.NODE_LIST) member type, this will be populated with any parameters of the form NodeList[n]/nodeVersionReference. This is, for example, produced by the standard package display component when additional select boxes are added to select rows for further processing.