EmmlProfile Module

RhoElements 2.x API

Overview

The EmmlProfile Module is used to manage EMML profile pages.

Syntax

emmlProfile (Module) <META> Syntax

<META HTTP-Equiv="EMMLProfile" content="parameter:value">

EmmlProfile JavaScript Object Syntax:
By default the JavaScript Object 'emmlProfile' will exist on the current page and can be used to interact directly with the emmlProfile.
To Set emmlProfile parameters via JavaScript use the following syntax: emmlprofile.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. emmlProfile.name = 'value';

To set multiple EMML parameters / events on a single line use the following syntax: emmlprofile.setEMML("[Your EMML Tags]");

e.g. emmlProfile.setEMML("name:value");

##Parameters Items listed in this section indicate parameters, or attributes which can be set.
NamePossible ValuesDescriptionDefault Value
name:[Value] [optional name] (see remarks below)Imports the EMML profile page stored at the local specified by "importProfile". Nb. This parameter should come before the related import profile method.N/A
importProfile:[Value] url('URI')http or file location of the .emmp file containing the EMML profiles to be imported.N/A
clear:[Value] [optional name] (see remarks below)Clears the currently loaded EMML profiles.N/A
apply:[Value] [profile class name]Applies the EMML profile with the class name specified. N/A

Remarks

Named Profile Pages

Normally, when importing a profile page, the imported profiles will be cleared from memory when the page is navigated away from. If you provide a name when importing a profile page, the imported profiles will not be cleared on page navigation and you will be able to reference them until you manually clear the profiles. To reference a named imported profile, prefix the profile class name with the name you supplied when importing the profile page (see example above). Naming profile pages can improve performance. If you include many profiles for your application within the profile page, it will only have to be downloaded, parsed and imported the once. It is often also preferable to maintain a central location for all your EMML.

Importing Local Profiles

Importing profiles from a file:// location will cause the profile to be moved from its previous location, not copied.

Requirements

RhoElements Version1.0.0 or above
Supported DevicesAll supported devices.
Minimum Requirements
PersistencePartially Transient - any changes made by changing parameters will be lost when navigating to a new page with the exception of when a named EMML profile set is imported.

HTML/JavaScript Examples

The following example imports an EMML profile page into the temporary, unnamed space:

    
    <META HTTP-Equiv="EMMLProfile" Content="importProfile:url('http://myserver/scannerparams.emmp');">

The following example imports an EMML profile page into a page persistent, named space:

    
    <META HTTP-Equiv="EMMLProfile" Content="name:scanner_params;importProfile:url('http://myserver/scannerparams.emmp');">

The following example applies two profile classes from the temporary, unnamed space:

    
    <META HTTP-Equiv="EMMLProfile" Content="apply:default_decoders;">
    <META HTTP-Equiv="EMMLProfile" Content="apply:inventory_decoders;">

The following example applies two profile classes from page persistent, named space:

    
    <META HTTP-Equiv="EMMLProfile" Content="apply:scanner_params.default_decoders;">
    <META HTTP-Equiv="EMMLProfile" Content="apply:scanner_params.inventory_decoders;">

The following is an example of an EMML Profile page:

    .default_decoders
    {
      scanner-all_decoders: disabled;
      scanner-code128other128: false;
      scanner-code128maxlength: 10;
      scanner-code128minlength: 1;
      scanner-code128: enabled;
    }

    .inventory_decoders
    {
      scanner-ean13converttocode128: true;
      scanner-ean13: enabled;
      scanner-ean8: enabled;
      scanner-i2of5: enabled;
      scanner-code128: enabled;
    }