ナビゲーションリストが使用するフォルダーの種類は、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ドキュメントには、ドキュメント名と名前空間を指定するnameおよび名前空間属性を持つ<navtree>
ルート要素が含まれています。 名前と名前空間は、ドキュメントIDキーを構成します。
アプリケーションのグローバルコマンドは、ドキュメント内で<commands>
要素から宣言されます。
ファイルタイプの宣言は、次の要素を含むドキュメントで構造化されます。<model>
と<nodemodel>
。
グローバルコマンドを使用すると、アクションを起動できます。 このアクションは、入力フォームまたはSOAP呼び出しの場合があります。
グローバルコマンドは、メインのツールメニューからアクセスできます。
コマンド設定構造は次のとおりです。
<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>
要素の下に入力する必要があります。 この要素を使用すると、追加新しいフォルダーメニューから表示できる階層構造を定義できます。 <model>
要素には、<nodemodel>
要素と他の<model>
要素を含める必要があります。
nameおよびlabel属性は、要素の内部名と追加新しいフォルダーメニューに表示されるラベルに入力されます。
<nodemodel>
要素には、次のプロパティを持つフォルダータイプの説明が含まれます。
<nodemodel>
区切り)のリスト。<nodemodel>
要素の下の<view>
要素には、表示に関連付けられたリストの設定が含まれます。 リストのスキーマは、<view>
要素のスキーマ属性に入力されます。
リストのレコードを編集するには、リストスキーマと同じ名前の入力フォームが暗黙的に使用されます。 <view>
要素のtype属性は、フォームの表示に影響します。 次のような値を選択できます。
入力フォームの名前は、<view>
要素にform属性を入力するとオーバーロードできます。
リスト列のデフォルト設定は、<columns>
要素を介して入力されます。 xpath属性を含む<node>
スキーマで列が宣言され、その要素で参照するフィールドが値として使用されます。
例:"nms:folder"スキーマーでの受信者ータイプの宣言。
<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呼び出しの場合があります。
コマンドは、リストのアクションメニューまたは関連するメニューボタンからアクセスできます。
コマンド設定構造は次のとおりです。
<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>
フォルダー管理操作には2種類あります。
リンクされたフォルダーの場合、<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>