作为专家用户,您可以在资源管理器树中添加文件夹并对其进行自定义。
进一步了解Campaign资源管理器和导航层次结构 在此部分中.
导航列表使用的文件夹类型在遵循 xtk:navtree 架构。
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 和 命名空间 属性来指定文档名称和命名空间。 名称和命名空间构成了文档标识键。
应用程序的全局命令在文档中声明自 <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>
元素,其属性如下:
A <command>
元素可包含 <command>
子元素。 在这种情况下,父元素允许您显示由这些子元素组成的子菜单。
命令以与在XML文档中声明的顺序相同的顺序显示。
使用命令分隔符可显示命令之间的分隔条。 它由 '-' 命令标签中包含的值。
可选存在 <soapcall>
标记及其输入参数定义要执行的SOAP方法的调用。 有关SOAP API的详细信息,请参阅 Campaign 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 菜单。 A <model>
元素必须包含 <nodemodel>
元素和其他 <model>
元素。
的 name 和 标签 属性填充元素的内部名称和 Add new folder 菜单。
的 <nodemodel>
元素包含文件夹类型的描述,其属性如下:
<nodemodel>
用逗号分隔)。的 <view>
元素 <nodemodel>
元素包含与视图关联的列表的配置。 列表的架构在 模式 属性 <view>
元素。
要编辑列表的记录,将隐式使用与列表架构同名的输入表单。 的 type 属性 <view>
元素会影响表单的显示。 可能的值包括:
通过输入 表单 属性 <view>
元素。
列表列的默认配置通过 <columns>
元素。 列在 <node>
包含 xpath 属性,其中要在其架构中引用的字段作为其值。
示例:“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>
元素,其属性如下:
A <command>
元素可包含 <command>
子元素。 在这种情况下,父元素允许您显示由这些子元素组成的子菜单。
命令以与在XML文档中声明的顺序相同的顺序显示。
使用命令分隔符可显示命令之间的分隔条。 它由 '-' 命令标签中包含的值。
可选存在 <soapcall>
标记及其输入参数定义要执行的SOAP方法的调用。 有关SOAP API的更多信息,请参阅 Campaign 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>
文件夹管理操作有两种类型:
对于链接的文件夹, folderLink 属性 <nodemodel>
必须填充元素。 此属性包含在数据架构中配置的文件夹中的链接名称。
数据架构中链接文件夹的声明示例:
<element default="DefaultFolder('nmsFolder', [@_folder-id])" label="Folder" name="folder" revDesc="Recipients in the folder" revIntegrity="define" revLabel="Recipients" target="xtk:folder" type="link"/>
的配置 <nodemodel>
在名为“folder”的文件夹的链接上,如下所示:
<nodeModel deleteRight="folderDelete" editRight="folderEdit" folderLink="folder"
img="nms:folder.png" insertRight="folderInsert" label="Recipients" name="nmsFolder">
...
</nodeModel>