Using OpenURI for Internal Resources

Using OpenURI for Internal Resources

Internal Resources are resources contained within the Virtual Ticket system. To open internal resources using OpenURI, you must employ a specific syntax.

OpenURI - Internal Resource Syntax

The elements of the OpenURI syntax for internal resources are described below.

      1. Conceptual illustration of components of OpenURI for an internal resource.

      1. Labeled examples of OpenURI for external resources.

Property

Description

<internal-uri>

OpenURI function for an internal resource. Always composed of <internal-scheme> and <internal-resource> elements.

<internal-scheme>

Component of the OpenURI function for internal resource(s). Currently, the following values are permitted:

vt:

<internal-resource>

Component of the OpenURI function for internal resource(s). This is composed of the following segments:

<hierarchical-resource-path>

<query>

<hierarchical-resource-path>

An element of <internal-resource>. In the current implementation, the <hierarchical-resource-path> element is composed entirely of the <application-window-path> element (see below). This segment of the OpenURI function may be referred to by either name.

<application-window-path>

The application window to open. In the current implementation, the <application-window-path> segment composes the entire <hierarchical-resource-path> segment. This segment of the OpenURI function may be referred to by either name.

Currently, the following values are permitted:

//browser

<query>

The query component always starts with a leading question mark ("?"). This segment is used to identify which object to open in the specified application window (browser) and how it should be opened (in edit mode, etc...). Additional functionality may be specified.

The <query> segment is composed of <key> and <value> pairs.

<key>

The following keys are permitted for use in the OpenURI function when calling internal resources:

type

id

group

form

new_window

window_mode

new_type

new_form

new_id

user_data

action

confirmation

Note: keys may have dependencies that require the inclusion of additional keys. See "Available Keys" below for additional details.

<value>

Dependent upon corresponding <key> value used in the OpenURI statement. Will either be an absolute value or a percent encoded string (see Using OpenURI for Internal Resources).

Available Keys

The following keys are available when using the OpenURI function to specify an internal resource. Note that some keys have dependencies. That is, the use of one key may require the use of another key.

Key

Valid Values

Description

Additional Required Keys

Note

type

<percent-encoded-string>

Existing Master or Document Type.

id if type specifies a document type.

If window_mode=new, type is restricted to Master Types.

id

<percent-encoded-string>

id of an existing document of the specified type.

type

group

<percent-encoded-string>

Requested Group (existing or virtual).

type, id

form

<percent-encoded-string>

Requested form.

type, id

new_window

"yes" (default), "no"

Spawn a new window.

window_mode

"view" (default), "edit", "new"

Window mode to enter.

type, id if window_mode=edit

new_type, new_form if window_mode=new

new_type

<percent-encoded-string>

New document's type.

window_mode=new

new_form

<percent-encoded-string>

New document's form.

window_mode=new

new_id

<percent-encoded-string>, "auto"

New document's ID.

window_mode=new

user_data

<percent-encoded-string>

User data.

Is passed as userData property of "loadObject", "objectLoaded" and "objectSet" events for existing objects, and "editingStarted" event when window_mode=new|edit.

action

"add", "edit", "update", "cancel", "delete", "close"

Window action to perform.

confirmation

"yes" (default), "no"

Ask for confirmation.

action=cancel

Percent Encoded Strings

Some values used in OpenURI functions for internal resources must be encoded as "percent encoded strings". These are required when and if the absolute value includes a special character called a "Reserved Character". Consult the table below for a list of reserved characters and their percent encoded equivalents.

Reserved Characters

Percent Encoded Equivalent

!

%21

*

%2A

'

%27

(

%28

)

%29

;

%3B

:

%3A

@

%40

&

%26

=

%3D

+

%2B

$

%24

,

%2C

/

%2F

?

%3F

%

%25

#

%23

[

%5B

]

%5D

Execution/Processing

All OpenURI MetaScript functions are processed asynchronously except for those that use the action key with a value not equal to "close".

Examples and Explanations

The following OpenURI examples are provided, along with an explanation of the resulting functionality.

Example 1

OpenURI Function

OpenURI( "vt://browser" );

Opens a new browser window in the Virtual Ticket application.

Example 2

OpenURI Function

OpenURI( "vt://browser?type=job&id=2&form=Job_Form2" );

Displays record information for Job #2 using the "Job_Form2" form in a new browser window.

Example 3

OpenURI Function

Displays record information for Job #2 using the "Job_Form2" form in a new browser window. Browser opens the record in editing mode.

Example 4

OpenURI Function

Creates a new job record in the database and displays the record information in a new browser window using the "ticket2_form".

Example 5

OpenURI Function

Creates a new Design document object under Job with id "1" using form "Design Entry".


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.