windchill从半路开始-01Navigation

来源:互联网 发布:删除表数据delete 编辑:程序博客网 时间:2024/04/28 19:33


功能:

         客制化navigation 并在其中添加action,点击action弹出页面

环境:

          windchill 10.2

步骤:

          1、通过jacaDebug=1找到navigation对应的action和actionModel文件,从中选取需要的部分

               定义action文件===>cust-navigation-actions.xml:

  <!-- 定义navigation -->    <objecttype name="navigation" class="" resourceBundle="com.test.resource.NavigationRB">        <action name="navigationList">        </action>   </objecttype>      <!-- 定义navigationList中需要显示的action -->     <objecttype name="cust-navigationList" class="" resourceBundle="com.test.resource.NavigationRB">        <action name="helloWord" >        <command url="/netmarkets/jsp/test/navigation/navigationList.jsp" windowType="page" />        </action>   </objecttype>
           定义actionModel文件====> cust-navigation-actionModels.xml

    <model name="main navigation" id="browseActions" resourceBundle="com.ptc.core.ui.navigationRB">        <description>            Main navigation (tabs)        </description>        <action name="recentContexts" type="navigation"/>        <action name="product" type="navigation"/>        <action name="library" type="navigation"/>        <action name="project" type="navigation"/>        <action name="program" type="navigation"/>        <action name="change" type="navigation"/>        <action name="supplier" type="navigation"/>        <action name="qms" type="navigation"/>        <action name="org" type="navigation"/>        <action name="site" type="navigation"/>        <action name="clfAdmin" type="navigation"/>        <action name="search" type="navigation"/>        <!-- entry for customization tab -->        <action name="customization" type="navigation"/>        <!-- cust Navigation -->        <action name="navigationList" type="navigation"/>    </model>        <!-- navigationList navigation   action名字+类型      将helloWord引用到navigationList下     -->    <model name="navigationList navigation" resourceBundle="com.test.resource.NavigationRB">       <action name="helloWord" type="cust-navigationList" />    </model>    
           2、  定义资源文件====>resourceBundle="com.test.resource.NavigationRB"
                 

                 NavigationRB.java

     /* * 客制化navigation显示名称 */@RBEntry("NavigationList") public static final String NAVIGATION_01 = "navigation.navigationList.description";//定义图标显示位置默认存放在images下,此处存放在netmarkets/images/test/navigationList.png                                           @RBEntry("test/navigationList.png")public static final String NAVIGATION_02 = "navigation.navigationList.icon";//客制化action显示名称 @RBEntry("helloWord")public static final String NAVIGATIONLIST_01 = "cust-navigationList.helloWord.description";

NavigationRB_zh_CN.java为中文显示的资源文件

    /*  * 客制化navigation显示名称 */@RBEntry("NavigationList")public static final String NAVIGATION_01 = "navigation.navigationList.description";//定义图标显示位置默认存放在images下,此处存放在netmarkets/images/test/navigationList.png                                     @RBEntry("test/navigationList.png")public static final String NAVIGATION_02 = "navigation.navigationList.icon";//客制化action显示名称@RBEntry("helloWord")public static final String NAVIGATIONLIST_01 = "cust-navigationList.helloWord.description";

3、jsp文件

<command url="/netmarkets/jsp/test/navigation/navigationList.jsp" windowType="page" />

在codebase/netmarkets/jsp 新建test文件夹,在test文件夹中新建navigation文件夹,在navigation中新建navigationList.jsp

<%@ page language="java" session="true" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%><%@ include file="/netmarkets/jsp/util/begin.jspf"%>helloWord<%@ include file="/netmarkets/jsp/util/end.jspf"%>

4、将class文件 和对应的xml jsp等 拷贝到windchill对应的目录中,重启系统。找到克制的navigation







0 0
原创粉丝点击