導航清單使用的資料夾類型在遵循xtk:navtree模式的語法的XML文檔中進行了描述。
XML文檔的結構如下:
<navtree name="name" namespace="name_space">
<!-- Global commands -->
<commands>
...
</commands>
<!-- Structured space for adding a folder -->
<model name="<name>" label="<Label>">
<!-- Folder type -->
<nodeModel>
...
</nodeModel>
<model name="<name>" label="<Sub model>">
...
</model>
</model>
</navtree>
XML文檔包含<navtree>
根元素,其中name和namespace屬性用於指定文檔名和namespace。 名稱和名稱空間構成檔案識別索引鍵。
應用程式的全局命令在文檔中從<commands>
元素聲明。
檔案類型的聲明在文檔中具有以下元素:<model>
和<nodemodel>
。
全域命令可讓您啟動動作。 此動作可以是輸入表單或SOAP呼叫。
可從主Tools菜單訪問全局命令。
命令配置結構如下:
<commands>
<!-- Description of a command -->
<command name="<name>" label="<label>" desc="<Description>" form="<form>" rights="<rights>">
<soapCall name="<name>" service="<schema>">
<param type="<type>" exprIn="<xpath>"/>
...
</soapCall>
<enter>
...
</enter>
</command>
<!-- Separator -->
<command label="-" name="<name>"/>
<!-- Command structure -->
<command name="<name>" label="<Label>">
<command...
</command>
</commands>
在<command>
元素中輸入全局命令的說明,其屬性如下:
<command>
元素可包含<command>
子元素。 在這種情況下,父元素可讓您顯示由這些子元素組成的子功能表。
這些命令的顯示順序與在XML文檔中聲明的順序相同。
命令分隔符號可讓您在命令之間顯示分隔列。 它由命令標籤中包含的'-'值標識。
<soapcall>
標籤及其輸入參數的可選存在定義了要執行的SOAP方法的調用。 有關SOAP API的詳細資訊,請參閱促銷活動JSAPI檔案。
從<enter>
標籤初始化時,可更新表單內容。 有關此標籤的詳細資訊,請參閱輸入表單的檔案。
範例:
聲明全域命令以啟動"xtk:import"表單:
<command desc="Start the data import wizard" form="xtk:import" label="&Data import..." name="import" rights="import,recipientImport"/>
命令標籤中&的存在會在「I」字元上宣告鍵盤快速鍵。
具有分隔符的子菜單示例:
<command label="Administration" name="admin">
<command name="cmd1" label="Example 1" form="cus:example1"/>
<command name="sep" label="-"/>
<command name="cmd1" label="Example 2" form="cus:example2">
<enter>
<set xpath="@type" expr="1"/>
</enter>
</command>
</command>
執行SOAP方法:
<command name="cmd3" label="Example 3" promptLabel="Do you really want to execute the command?">
<soapCall name="Execute" service="xtk:sql"/>
</command>
資料夾類型可讓您存取結構的資料。 與資料夾關聯的視圖由清單和輸入表單組成。
資料夾類型配置結構如下:
<!-- Structured location to add the folder -->
<model name="name" label="Labelled">
<!-- Type of folder -->
<nodeModel name="<name>" label="<Labelled>" img="<image>">
<view name="<name>" schema="<schema>" type="<listdet|list|form|editForm>">
<columns>
<node xpath="<field1>"/>
...
</columns>
</view>
</nodeModel>
<model name="<name>" label="<Sous modèle>">
...
</model>
</model>
必須在<model>
元素下輸入資料夾類型聲明。 此元素可讓您定義可從Add new folder功能表看到的階層式組織。 <model>
元素必須包含<nodemodel>
元素和其他<model>
元素。
name和label屬性填入元素的內部名稱和顯示在Add new folder功能表中的標籤。
<nodemodel>
元素包含資料夾類型的說明,其屬性如下:
<nodemodel>
的捷徑清單(以逗號分隔)。<nodemodel>
元素下的<view>
元素包含與視圖關聯的清單的配置。 清單的模式輸入在<view>
元素的schema屬性中。
要編輯清單的記錄,將隱式使用與清單方案同名的輸入表單。 <view>
元素上的type屬性會影響表單的顯示。 可能的值包括:
通過在**<view>
元素中輸入form**屬性,可以使輸入表單的名稱過載。
清單列的預設配置是通過<columns>
元素輸入的。 在包含xpath屬性的<node>
元素上聲明列,其中該欄位在其模式中作為其值引用。
範例:"nms:recipient"架構上的資料夾類型聲明。
<model label="Profiles and targets" name="nmsProfiles">
<nodeModel deleteRight="folderDelete" editRight="folderEdit" folderLink="folder"
img="nms:folder.png" insertRight="folderInsert" label="Recipients"
name="nmsFolder">
<view name="listdet" schema="nms:recipient" type="listdet">
<columns>
<node xpath="@firstName"/>
<node xpath="@lastName"/>
<node xpath="@email"/>
<node xpath="@account"/>
</columns>
</view>
</nodeModel>
<nodeModel name="nmsGroup" label="Groups"...
</model>
相應的資料夾插入菜單:
載入清單時,可套用篩選和排序:
<view name="listdet" schema="nms:recipient" type="listdet">
<columns>
...
</columns>
<orderBy>
<node expr="@lastName" desc="true"/>
</orderBy>
<sysFilter>
<condition expr="@type = 1"/>
</sysFilter>
</view>
快捷方式命令可讓您在選擇清單時啟動操作。 動作可以是輸入表單或SOAP呼叫。
可從清單的Action菜單或相關菜單按鈕訪問命令。
命令配置結構如下:
<nodeModel...
...
<command name="<name>" label="<label>" desc="<Description>" form="<form>" rights="<rights>">
<soapCall name="<name>" service="<schema>">
<param type="<type>" exprIn="<xpath>"/>
...
</soapCall>
<enter>
...
</enter>
</command>
</nodeModel>
在<command>
元素上輸入命令的說明,其屬性如下:
<command>
元素可包含<command>
子元素。 在這種情況下,父元素可讓您顯示由這些子元素組成的子功能表。
這些命令的顯示順序與在XML文檔中聲明的順序相同。
命令分隔符號可讓您在命令之間顯示分隔列。 它由命令標籤中包含的'-'值標識。
<soapcall>
標籤及其輸入參數的可選存在定義了要執行的SOAP方法的調用。 有關SOAP API的詳細資訊,請參閱促銷活動JSAPI檔案。
表單內容可透過<enter>
標籤在初始化時更新。 有關此標籤的詳細資訊,請參閱輸入表單檔案。
範例:
<command desc="Cancel execution of the job" enabledIf="EV(@status, 'running')"
img="nms:difstop.bmp" label="Cancel..." name="cancelJob"
promptLabel="Do you really want to cancel this job?" refreshView="true">
<soapCall name="Cancel" service="xtk:jobInterface"/>
</command>
<command label="-" name="sep1"/>
<command desc="Execute selected template" form="cus:form" lmonoSelection="true" name="executeModel"
rights="import,export,aggregate">
<enter>
<set expr="0" xpath="@status"/>
</enter>
</command>
資料夾管理操作有兩種類型:
對於連結的資料夾,必須填入<nodemodel>
元素上的folderLink屬性。 此屬性包含資料架構中配置的資料夾上的連結的名稱。
資料方案中連結資料夾的聲明示例:
<element default="DefaultFolder('nmsFolder')" label="Folder" name="folder" revDesc="Recipients in the folder" revIntegrity="own" revLabel="Recipients" target="xtk:folder" type="link"/>
名為"folder"的資料夾連結上的<nodemodel>
配置如下:
<nodeModel deleteRight="folderDelete" editRight="folderEdit" folderLink="folder"
img="nms:folder.png" insertRight="folderInsert" label="Recipients" name="nmsFolder">
...
</nodeModel>