我使用的是 Windchill 10.0 M030。在我的 GUI 中,我需要在报告工具栏下拉列表中添加一个自定义按钮。
下图清楚地显示了我的问题
我尝试在 psb-actionmodels.xml 文件中的相应模型名称下添加条目,如下所示
<model name="psbRelatedPartsTreeToolBar">
....
<action name="psbReportsGroupGWT" type="psb" />
<action name="psbReportsGWT" type="psb" />
<action name="psbReportMultiLevelCompListGWT" type="psb" />
<action name="separator" type="separator" />
<action name="psbReportSingleLevelConsolBOMGWT" type="psb" />
<action name="psbReportSingleLevelBOMGWT" type="psb" />
<action name="psbReportSingleLevelBOMWithNotesGWT" type="psb" />
<action name="separator" type="separator" />
<action name="psbReportMultiLevelBOMGWT" type="psb" />
<action name="psbReportMultiLevelBOMWithReplacementsGWT" type="psb" />
<action name="seperator" type="seperator" />
<action name="HBOMReportsGWT" type="psb" />
<action name="psbReportMultiLevelBOMWithAMLAVLGWT" type="psb" />
<action name="psbReportMultiLevelBOMWithAMLGWT" type="psb" />
<action name="separator" type="separator" />
<action name="singleSourceOEMPartsGWT" type="psb" />
<action name="uniqueManufacturerPartsGWT" type="psb" />
<action name="separator" type="separator" />
<action name="changeBaselineReportGWT" type="change" />
<action name="exportActionsGWT" type="cat"/>
<action name="exportCsvGWT" type="cat" />
<action name="exportHtmlGWT" type="cat" />
<action name="exportTextGWT" type="cat" />
<action name="exportXlsGWT" type="cat" />
<action name="exportXlsxGWT" type="cat" />
<action name="exportXlsReportGWT" type="cat" />
<action name="exportXmlGWT" type="cat" />
<action name="newButton" type="cat" />
</model>
我在这里添加了名为 newButton 的按钮,并且在 cat-actions.xml 文件中有相应的条目。
但是该按钮不在该列表中。这是正确的方式吗?或者我不知道如何在那里添加按钮。有人建议我哪些是我需要更改的 xml 文件以及要更改的类文件或 rbInfo 是什么?
最佳答案
PTC 目前不支持功能区栏自定义。
如果您想在此菜单中集成新按钮,您需要充分了解 GWT (Google Web Toolkit),因为此按钮栏是使用 GXT 库开发的。我不建议这样做,因为您永远不会从 PTC 获得关于此主题的支持。
右键单击产品结构浏览器(在屏幕截图中的 HBOM22 部分)应会显示您添加到 psb-actionmodels.xml 的新按钮。
在上下文菜单中获取操作通常是一个很好的解决方案。然后您可以自定义该操作适用于哪种对象类型(在 typeBasedActionFilter.properties 配置文件中)
关于java - 如何在 Windchill GUI 中的列表内添加自定义按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15471892/