Application

This document provides the details of the configuration elements.

Requirements
Reference Framework 2.0 runs against Nexaweb Platform 4.5.33 or higher.

Globals

An element containing the list of components (e.g. MCOs, Macros, datasources or any element from any namespace) to be loaded for global use.

Configuration

<globals>
      <mco/>
      <macro/>
</globals>

Shortcut Keys

Contains the list of shortcut key definitions to be loaded for use within the application.

Configuration

<shortcutKeys>
    <shortcut key="F5" o
     nCommand="PageManager.loadPage( 'dataIntegration' )" role="ROLE_ADMIN"/>
</shortcutKeys>

<shortcutKeys>

An element containing the list of shortcut key definitions to be loaded for use within the application.

<shortcut>

A shortcut represents key sequence, command to execute and role/roles that dictate if this shortcut is available to the user. 

key

Specifies the key sequence for this shortcut. This attribute is optional.

onCommand

Specifies the event handler to execute for the this menu item. This attribute is optional.

role

Specifies the role or roles that dictate if this shortcut is available to the user. This attribute is optional.

 

HomePage

Configure the page to be used as the home page.

Configuration

<homepageConfig>
      <homepage pageId="homepage" role=""/>
</homepageConfig>

<homepageConfig>

Configure the page to be used as the home page.

<homepage>

Files can be configured for preload. The number of preloaded files does not have to match the size of the cache. If the size of the cache is greater than the number of preloads, then other files opened can occupby the slots.

pageId

Specifies the name of the page to use as the homepage. This attribute is optional.

role

Specifies Specifies the role or roles assigned to this homepage. This page will be used as the homepage if security is enabled and the user's roles match the roles assgined to this homepage definition.  This attribute is optional, when omitted, all roles can access the page.

 

Cache/xalCache

Caching has been added to the reference framework.
NOTE : Use of the cache in Reference Framework requires version 4.5.40 or higher.

Configuration

The cache is configured as part of the Reference Frameowrk configuration file nexaweb-reference-framework.xml.  

<xalCache cacheSize="5">
   <cacheSlot path="/XAL/include/IncludeTest.xal" keepInCache=”true”/>
   <cacheSlot path="/XAL/include/Frag1.xal"/>
</xalCache>

<xalCache>

The xalCache tag is required for configuring the cache. If the tag does not exist in the configuration file, then the cache will not be configured.

cacheSize

The cacheSize attribute of the xalCache tag, signifies the maximum number of slots available for caching files. If the attribute is not include, then the default size
of the cache will be 10.

If the number of files to be cached exceeds the size of the cache, then least recently used file will be rmoved from the cache.

<cacheSlot>

Files can be configured for preload. The number of preloaded files does not have to match the size of the cache. If the size of the cache is greater than
the number of preloads, then other files opened can occupby the slots.

The cacheSlot tag is optional. If not files need to be preloaded, then they can be omitted.

keepInCache

The KeepInCache attribute of the cacheSlot tag can keep a file from being removed from cache, when the number of files being cached exceed the cache size.
Setting this attribute to true, will keep the file in this cache slot from being removed from the cache.  If the attribute is not set, the value is set to false,
and the file in this cache slot can be removed from cache.

NOTE:
If the numbe of cache slots with keepInCache, matches or exceeds the size of the cache, then no new cache slots can be created.   If the number of preload cache slots
with keep alive, exceed the size of the cache, then the files associated with the cache slots that do not get created will not be preloaded.

 

 

Data Service (encoding)

Configuration

The cache is configured as part of the Reference Frameowrk configuration file nexaweb-reference-framework.xml.    

<dataService>
      <encoding>xml</encoding>
      <encodeRequest>false</encodeRequest>
      <encodeResponse>true</encodeResponse>
</dataService>
   

<dataService>

The dataService tag allows for configuration of how data is passed from the client to the server Reference Framework’s ClientDataService, as well as how the data is returned to the client from the server.

The dataService tag is optional.If the tag is not configured, then data will be passed to and from the server, without any encoding.
 

<encoding>

The encoding tag indicates the type of encoding that is used the request data (client to server) and response object (server to client), when using the Client Data Service. 

Valid Encoding types

      object  - (or identity) means that no encoding is used
      gzip   - the data will be compressed using gzip
      xml     - the data will be passed as XML    

The encoding tag is optional.  The default value is object.

<encodeRequest>

The encodeRequest tag provides a way to configure whether or not to encode the request data. This is an optional tag.  The default value is true.

<encodeResponse>

The encodeResponse tag provides a way to configure whether or not to encode the response object being returned from the server. This is an optional tag.  The default value is true.

 

MenuGroups 

Configuration

<menuGroups>
    <menuGroup name="application" text="">
        <item image="/images/menu_logout.png" name="logoutMenu" onCommand="SecurityManager.logout()" text="Log Out" tooltip="log out"/>
    </menuGroup>
</menuGroups>

<menuGroups>

Configures the application menubar. Either a main menu or a child menu can bundle an action.

<menuGroup>

A shortcut represents key sequence, command to execute and role/roles that dictate if this shortcut is available to the user.

<item>

A menu item in the menu list.

image

Specifies the source of an image to be displayed in the menu item. This attribute is optional.

name

Specifies the name used to identify the menu item. This attribute is optional.

onCommand

Specifies the event handler to execute for the this menu item. This attribute is optional.

roleEnabled

Specifies the role or roles that dictate if this item is enabled. This attribute is optional. See more at

roleVisible

Specifies the role or roles that dictate if this item is visible to the user. This attribute is optional. See more at

text

Specifies the text to be displayed in the menu item. This attribute is optional.

tooltip

Specifies  the text to be displayed in the tooltip for the menu item. This attribute is optional.

 

Commandbar 

Configuration

 <commandbar>
    <button image="/images/bar_cancel.png" name="commandBar.bbClose" 
            onCommand="PageManager.closePage()" tooltip="Close"/>
    <button image="/images/menu_refresh.png" name="commandBar.bbRefresh" 
            role="ROLE_USER" tooltip="Refresh"/>
    <button image="/images/bar_print.png" name="commandBar.bbPrint" 
            tooltip="Print"/>
</commandbar>

<commandbar>

Configures the application toolbar. each command button can bundle an action which is previously defined.

<button>

A button item in the command bar.

image

Specifies the source of an image to be displayed for this button. This attribute is optional.

name

Specifies the name used to identify the button. This attribute is optional.

onCommand

Specifies the event handler to execute for the this button. This attribute is optional.

roleEnabled

Specifies the role or roles that dictate if this item is enabled. This attribute is optional. See more at

roleVisible

Specifies the role or roles that dictate if this item is visible to the user. This attribute is optional. See more at

tooltip

Specifies  the text to be displayed in the tooltip for the button. This attribute is optional.

 

Statusbar

Configuration

<statusPanels>
  <statusPanel horizontalAlignment="left" image="" 
     name="statusBar.bar1" text="Hello, everybody!" width="80%"/>
  <statusPanel image="" name="statusBar.bar2" text="Ready" width="19%"/>
</statusPanels>

<statusPanels>

Configure the status bar on the home page.

<statusPanel>

The panel(s) display the status info of the application

image

Specifies the source of an image to be displayed for status panel. This attribute is optional.

name

Specifies the name used to identify status panel. This attribute is optional.

horizontalAlignment

Specifies the alignment to be used to display the text within the status panel. This attribute is optional.

width

The width of the status panel in pixels. For components managed by an active layout manager, setting this value will act as the preferred width.

 

Events

Configuration

<appEvents>
   <onAppInit>mco:sampleMco.onAppInit()</onAppInit> 
   <onAppStartup>mco:sampleMco.onAppStartup()</onAppStartup>
</appEvents>

 <onAppInit>

The onAppInit element contains the handler for the onAppInit event. This is an optional element that must contain valid mco syntax.

The onAppInit event is fired after the configuration file has been read, but before the application UI is built. This provides a means for modifying the configuration of the application before it is rendered.

<onAppStartup>

The onAppStartup element contains the handler for the onAppStartup event. This is an optional element that must contain valid mco syntax.

The onAppStartup event is fired after the application UI has been built and after the home page has been loaded. If security is enabled, this event is fired after the user has been successfully logged in, and after the onLoginSucceeded event has fired. This provides a means for doing global initializations after the application has started