Windchill面试资料总结.docx

上传人:牧羊曲112 文档编号:3169270 上传时间:2023-03-11 格式:DOCX 页数:27 大小:46.92KB
返回 下载 相关 举报
Windchill面试资料总结.docx_第1页
第1页 / 共27页
Windchill面试资料总结.docx_第2页
第2页 / 共27页
Windchill面试资料总结.docx_第3页
第3页 / 共27页
Windchill面试资料总结.docx_第4页
第4页 / 共27页
Windchill面试资料总结.docx_第5页
第5页 / 共27页
亲,该文档总共27页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《Windchill面试资料总结.docx》由会员分享,可在线阅读,更多相关《Windchill面试资料总结.docx(27页珍藏版)》请在三一办公上搜索。

1、Windchill面试资料总结Windchill面试资料 1、 UI部分: 1.1、 navigation 一级菜单: Custom-actionModels.xml: Custom-actions.xml: 二级菜单: Custom-actionModels.xml: Custom-actions.xml: 三级菜单(partManagement-actionmodels.xml, changemanagement-actionmodel.xml, DocumentManagement-actionmodel.xml): Custom-actionModels.xml: 下拉菜单: Cust

2、om-actionModels.xml: 1.2、 button 创建按钮是一个十分简单的过程,例如要在如图所示的部分创建一个按钮: 第一步:在导航中输入&jcaDebug=1 第二步:查看debug之后发现此工具栏的Action Model Name=product list 第四步:点击“定制”、“工具”后出现: 第五步:在product list点击“搜索”后出现: 第六步:点击“”后出现: 第七步:查看PartManager-actionmodels.xml 复制 到custom-actionModels.xml 然后添加 第八步:在custom-action.xml中添加 创建产品

3、创建产品 创建产品 netmarkets/images/arrow_rightright.gif 第九步:reload xml:java markets.util.misc.NmActionServiceHelper 1.3、 页面客制化Tree 写两个方法:public List getRootNodes throws WTException和 public Map getNodes(List list) throws WTException getRootNodes方法如下 public List getRootNodes throws WTException NmCommandBean

4、nmcommandbean getModelContext.getNmCommandBean; if (nmcommandbean = null) return null; /获取上下文的一个对象 NmOid nmoid = nmcommandbean.getPrimaryOid; = WTPart wtpart; if (nmoid = null) if (wtpart = null) return null; configSpec = ConfigHelper.service.getConfigSpecFor(wtpart); /返回一个一个指定的wtpart的list return Co

5、llections.singletonList(wtpart); else wtpart = getGolfCart; /确定这个对象nmoid是否是这个类提供的实例 if (!nmoid.isA(wt.part.WTPart.class) /获得指向的对象 wtpart = (WTPart) nmoid.getRef; / The following 2 lines are one line throw new ClassCastException(new StringBuilder).append( Expected part, but was: else ).append(nmoid).

6、toString); getNodes方法如下 public Map getNodes(List list) throws WTException if (configSpec = null) HashMap hashmap = new HashMap; Persistable p = WTPartHelper.service.getUsesWTParts( new WTArrayList(list), configSpec); ListIterator listiterator = list.listIterator; do if (!listiterator.hasNext) WTPart

7、 wtpart = (WTPart) listiterator.next; wt.fc.Persistable p1 = plistiterator.previousIndex; if (p1 != null) ArrayList arraylist = new ArrayList(p1.length); hashmap.put(wtpart, arraylist); wt.fc.Persistable p2 = p1; int i = p2.length; break; configSpec = getDefaultConfigSpec; int j = 0; while (j i) wt.

8、fc.Persistable p3 = p2j; arraylist.add(p31); j+; while (true); return hashmap; 上面两个方法大概是讲获得上下文对象的节点和子节点,具体意思还没弄懂,懂的麻烦告诉一下。 增加自定义.xconf文件存储配置信息,如下 其中serviceClass属性是指写步骤中两个方法的类,selector属性是指在页面引入Tree的时候treeHandler的属性值,这个值一定要跟selector属性值一样 将.xconf文件注册完成后写一个jsp页面,下面主要给出引入Tree的代码 其中label属性是显示在tree左上角的名称,需

9、要做国际化;describeColumn是指Tree下面的属性,有多少个describeColumn就有多少个属性。 在Tree上面添加一些页面上的属性 在中添加menubarName属性,就是在Tree上添加下拉菜单,属性值就是在actionModels.xml文件中配置的model属性中name的属性值; 在下面添加标签就是在Tree上面添加全选菜单; 在下面添加标签就是在Tree上面添加工具栏,其中的value属性值就是在actionModels.xml文件中配置的model属性中name的属性值。 1.4、 客制化view 做View是建立在已经做好的Tree或Table上的,针对上面

10、做的Tree做View就是在Tree的页面上添加一些其它的属性,如 在中添加属性configurable=true属性就会有视图,要做自己的视图的话还要写自己的方法;添加helpContext=xx属性就是一个帮助按钮,针对Tree或Table里面的内容不同可以更换XX的值;添加singleSelect=true属性就会有单选框,当然是建立在已经有全选菜单的情况下,如果没有添加全选菜单添加该属性也没有效果;添加pageLimit=10属性就是分页,Tree或Table中的内容过多时就可以分页显示,属性值是多少就标示一页显示多少条内容;添加showPagingLinks =true属性就是给链接

11、,例如Tree下面是一个文件夹,加了该标签之后就可以点击该文件夹进入文件夹内的详细内容。 附上自己写View的代码 public class ConfigTable extends AbstractConfigurableTable columns.add(TableColumnDefinition.newTableColumnDefinition(/*name*/ TableViewDescriptor tvd= ColumnIdentifiers.NAME,/*lockable*/false); TableViewDescriptor.newTableViewDescriptor(/*na

12、me*/Sapmple View,tableId,/*system*/true,/*global*/true,columns, /*constraints*/null,/*match*/true,/*descriptption*/Sample View); public String getOOTBActiveViewName return null ; result.add(tvd); return result; public List getSpecialTableColumnsAttrDefinition(Locale locale) public List getOOTBTableV

13、iews(String tableId,Locale locale) throws List result=new ArrayList; Vector columns=new Vector; List result=new ArrayList; result.add(new result.add(new return result; TextAttribute(/*id*/foo,/*label*/Foo,locale); TextAttribute(/*id*/bar,/*label*/Bar,locale); WTException public String getLabel(Local

14、e locael) public Class getClassTypes public String getDefaultSortColumn return ColumnIdentifiers.NAME; return new ClassWTPart.class; return Custmom config table ; 这段代码首先是获得试图下拉菜单中属性,然后添加两个自己的视图属性,再获取Table View,设置添加视图选项所需的属性,再设置Table View的名称描述并添加到Table View。下面的四个方法分别是获取TableView的名称,在TableView上显示的第一名称

15、是默认的,返回null就使用默认名称;获取用户可见的表的名称;获取表中的对象的类型;获取默认情况下排序列的ID。 1.5、 创建表格 第一步:建立jsp 页面。存放在jsp/lenovo目录下,引入标签。 第二步:设置表格的属性。 属性包括,设置菜单栏,和工具条,分页,是否全部可选 ,建立视图,表格名称的国际化等。 第三步:描述表格的列名称 jca:describeColumn id=name/ 有两列,列名分别是名字和编号。 第四步:获得表的模型 属性descriptor的值要等于表格属性的变量var的值。 第五步:生成表,调用类的方法获得数据。 第六步:怎么去获得服务器的数据,根据的对象的

16、名称,编号等属性可以获得数据。 QuerySpec qs; QueryResult qr = null; WTPart doc = null; try qs = new QuerySpec(WTPart.class); SearchCondition sc = new SearchCondition(WTPart.class, WTPart.Name docName, false); qs.appendSearchCondition(sc); qr = PersistenceHelper.manager.find(qs); e.printStackTrace; catch (QueryExce

17、ption e) 1.6、 客制化Wizard 创建Wiard需要用用到的元素 、A main wizard page 定义wizard的所有的子步骤。 向导两步,第一个是选择创建对象的类型,第二个是创建对象的属性 、One or more wizard step pages 包含Wizard的所有子页面。 、custom-actions.xml-定义wizard和所有子步骤action。 、custom-actionModels.xml 将wizard action 添加到已有的或新加的action models中。 A form processor controller当wizard提交之

18、后进行后台逻辑处理。系统自带的有三个 系统有OOTB的三个Process ponents.forms.CreateObjectFormProcessor 创建对象 ponents.forms.DefaultEditFormProcessor 编辑对象 ponents.forms.EditWorkableFormProcessor 编辑工作对象 如果有特殊的逻辑需要处理,需要定制自己的Process。 定制的Process需要继承类DefaultObjectFormProcessor。 常见的标签 描述表格的属性 描述表格的属性。 描述列的属性。 获得模型 生成表格 生成树。 向导的下一步。 绑定在某个按钮上。 容器的特征。 例如:怎么在jsp显示属性结构: 。 1.7、 panel /定位菜单项 /展开左侧窗格图标 LeftPanel:xxx.jsp RightPanel:yyy.jsp Example: 主页面:左边是树结构,右边是表结构 LeftPanel:fru_ppnl.jsp Get a component model for our tree jca:getIeModel var=CustEx_tree_model7

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号