启动基于 JSP 的自定义页面
在自定义 Windchill MPMLink 的过程中,您可以创建一些基于 JSP 的页面。例如,使用在 BOM 变换器中找到的部件列表生成报告的自定义 JSP 页面。执行以下过程可创建一个启动程序,该启动程序将从 BOM 变换器中执行此报告,并在完成后使用任何新信息来刷新浏览器。
* 
在此示例中,基于 JSP 的自定义页面的名称为 customReport.jsp
1. 停止方法服务器。
2. customReport.jsp 复制到方法服务器的已知 netmarkets 目录。例如,<Windchill>\codebase\netmarkets\jsp\my-company\customReport.jsp。执行此操作可定义将用于启动 URL 页面的 URL。例如,ptc1\my-company\customReport
3. custom-actions.xml 添加条目,条目使用上述定义的 URL,并使用 LaunchCustomURLAction 作为命令类:
<objecttype name="mapsb" resourceBundle="com.example.mapsb.customMAPSBActionsRB">
....
<action name="customReportGWT" ajax="component">
<command class="com.ptc.cat.ui.client.action.LaunchCustomURLAction" method="execute"
url="/ptc1/my-company/customReport" windowType="popup"/>
<supportedTypes>
<type value="wt.part.WTPart"/>
</supportedTypes>
</action>
...
4. 向“制造商关联部件结构浏览器”的 custom-actionsModels.xml 添加一个条目。在此示例中,添加到 mapsbUstreamSideToolBar UI 组件中:
<actionmodels>
...
<model name="mapsbUpstreamSideToolBar">
...
<action name="customReportGWT" type="mapsb"/>
5. 重新启动方法服务器。
这对您有帮助吗?