基本自定义 > 用户界面自定义 > 可配置链接 > 可配置链接表 > 使可配置链接在 PSB 中可用
使可配置链接在 PSB 中可用
要将“可配置链接”设为在部件结构阅览器 (PSB) 中可用,请执行以下步骤:
1. 创建以下操作模型:
部件:configurable_links_structure_tab_part
部件主数据:configurable_links_structure_tab_partmaster
文档:configurable_links_structure_tab_doc
文档主数据:configurable_links_structure_tab_docmaster
2. com.ptc.windchill.enterprise.part.psb.showConfigurableLinksTab 特性设置为 true,这样便会在 PSB 中显示“可配置链接”选项卡。
以下为操作模型示例:
<actionmodels>
<!-- "Configurable Link Examples" 3rd level nav menu options -->
<model name="configLinks" resourceBundle="com.ptc.windchill.enterprise.object.configurableLinkExamplesResource">
<description>Custom Config Link 3rd level nav menu</description>
<action name="childObjectsTable_customDescribeLink" type="object"/> <!-- Describes Child Objects -->
<action name="childObjectsTable_customReferenceLink" type="object"/> <!-- Reference Child Objects -->
<action name="childObjectsTable_customRevisionLink" type="object"/> <!-- Describes Child Objects -->
<action name="childObjectsTable_customMastersLink" type="object"/> <!-- Master Child Objects -->
<action name="parentObjectsTable_customDescribeLink" type="object"/> <!-- Describes Parents Objects -->
<action name="parentObjectsTable_customReferenceLink" type="object"/> <!-- Reference Parent Objects -->
<action name="parentObjectsTable_customRevisionLink" type="object"/> <!-- Describes Parents Objects -->
<action name="parentdObjectsTable_customMastersLink" type="object"/> <!-- Master Parent Objects -->
</model>
<model name="configurable_links_structure_tab_part"> <!-- "Configurable Links Part PSB action model -->
<submodel name="configLinks"/> <!-- "Configurable Link Examples -->
</model>
</actionmodels>
自定义“可配置链接”选项卡名称
要在 PSB 中自定义“可配置链接”选项卡名称,请在 com.ptc.windchill.enterprise.part.psb.server.util.ConfigurableLinksResource 资源束中设置 PSB_CONFIGURABLELINKS_TAB_NAME 特性。
控制“可配置链接”选项卡在 PSB 中的显示
通过以下机制,可以控制“可配置链接”选项卡在 PSB 中的显示:
基于特性
基于角色
基于特性的显示控制
要控制“可配置链接”选项卡中“可配置链接”表格的显示,请对各个可配置链接类型使用以下特性:
ReferenceLink:com.ptc.windchill.enterprise.part.showReferenceLinksTable
DescribeLink:com.ptc.windchill.enterprise.part.showDescribeLinksTable
RevisionLink:com.ptc.windchill.enterprise.part.showRevisionLinksTable
MasterLink:com.ptc.windchill.enterprise.part.showMasterLinksTable
每个特性都可以有四个值:
PARENT:仅针对父项启用可配置链接。
CHILD:仅针对子项启用可配置链接。
ALL:针对父项和子项启用可配置链接。
OFF:针对所有项禁用可配置链接。
在预设系统中,可以使用以下筛选器:
hideBasedOnChildDescribeProperty:用于说明链接子项侧。
hideBasedOnParentDescribeProperty:用于说明链接父项侧。
hideBasedOnChildReferenceProperty:用于参考链接子项侧。
hideBasedOnParentReferenceProperty:用于参考链接父项侧。
hideBasedOnChildRevisionProperty:用于修订链接子项侧。
hideBasedOnParentRevisionProperty:用于修订链接父项侧。
hideBasedOnChildMasterProperty:用于主数据链接子项侧。
hideBasedOnParentMasterProperty:用于主数据链接父项侧。
* 
要将“可配置链接”设为在部件结构阅览器中或者在部件、文档或变更的信息页面上可用,必须先向 site.xconf 文件中添加特性。
使用 com.ptc.windchill.enterprise.part.psb.showConfigurableLinksTab 特性,可以控制“可配置链接”选项卡对所有用户的显示。
要针对现有的自定义可配置链接表启用基于特性的显示控制,必须向相应的操作添加合适的筛选器。
基于角色的显示控制
要针对现有的自定义可配置链接表启用基于角色的显示控制,必须向相应的操作添加合适的 uicomponent 属性。
* 
使用标准配置文件,可以控制“可配置链接”选项卡对特定用户的显示。
以下 UICOMPONENT 可用于“可配置链接”的显示控制:
VIEW_PSB_DESCRIBE_CONF_LINKS_TABLE:用于说明链接
VIEW_PSB_REFERENCE_CONF_LINKS_TABLE:用于参考链接
VIEW_PSB_REVISION_CONF_LINKS_TABLE:用于修订链接
VIEW_PSB_MASTER_CONF_LINKS_TABLE :用于主数据链接
以下为使用 UICOMPONENT 和筛选器的操作示例:
<action name="childObjectsTable_customDescribeLink" uicomponent="VIEW_PSB_DESCRIBE_CONF_LINKS_TABLE">
<command url="/netmarkets/jsp/object/configurableLinkRoleATable.jsp" />
<includeFilter name="hideForChangeTemplates"/>
<includeFilter name="hideBasedOnChildDescribeProperty"/>
<nonSupportedTypes value=="wt.vc.Mastered"/> <!-- This kind of link is not applicable for Mastered Context Objects -->
</action>
在 PSB 中添加、移除或重新排序“可配置链接”表格
简单来说,在相应的操作模型中添加、移除或重新排序操作,即可在 PSB 中添加、移除或重新排序“可配置链接”表格。
这对您有帮助吗?