PSB でのカスタムテーブルの表示
カスタムテーブルは、PSB の「属性」タブに表示できます。次の手順は、PSB でカスタムテーブルを表示する方法の例を示しています。
1. この例では、Windchill/codebase/netmarkets/jspcustomTable という名前のフォルダを作成します。
2. Windchill/codebase/netmarkets/jsp/customTable フォルダにサンプル customTable.jsp および customTable3.jsp をコピーします。customTable.jsp および customTable3.jsp の例は下にあります。
3. 次のプロパティを site.xconf ファイルに追加します。
<Property name="displayCustomJSPInAttributesTab" overridable="true" targetFile="codebase/wt.properties" value="customTable/customTable"/>
4. Windchill シェルから xconfmanager -Fp を実行します。
5. メソッドサーバーを再起動します。
6. PSB の「属性」タブにカスタムテーブルが表示されていることを確認します。
customTable.jsp
<% request.setAttribute(NmAction.SHOW_CONTEXT_INFO, "false"); %>
<%@ page import="wt.part.WTPart,
com.ptc.windchill.enterprise.part.partResource"%>
<%@ include file="/netmarkets/jsp/util/begin.jspf"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/components" prefix="jca"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/fmt" prefix="fmt"%>
<%--> Get resource bundle. <--%>
<fmt:setLocale value="${localeBean.locale}"/>
<fmt:setBundle basename="com.ptc.windchill.enterprise.part.partResource" />
<%--> Table 1 - Reference Documents <--%>
<fmt:message var="relatedReferenceDocTableLabel" key="<%= partResource.REFERENCES_DOC_TABLE_HEADER %>" />
<jca:describeTable var="relatedRefDocs"
id="part.relatedPartsReferencesDocuments.list"
type="wt.doc.WTDocument"
label="${relatedReferenceDocTableLabel}"
configurable="true" >
<jca:setComponentProperty key="selectable" value="true"/>
<jca:describeColumn id="type_icon" />
<jca:describeColumn id="number"/>
<jca:describeColumn id="version" />
<jca:describeColumn id="infoPageAction" sortable="false" />
<jca:describeColumn id="name" />
<jca:describeColumn id="containerName" />
<jca:describeColumn id="state" />
<jca:describeColumn id="lastModified"/>
<jca:describeColumn id="nmActions">
<jca:setComponentProperty key="actionModel"
value="relatedParts DescRef actions"/>
</jca:describeColumn>
</jca:describeTable>
<%-->Get a component model for our table<--%>
<jca:getModel var="tableModelRefDocs"
descriptor="${relatedRefDocs}"
serviceName="com.ptc.windchill.enterprise.part.commands.PartDocServiceCommand"
methodName="getAssociatedReferenceDocuments" >
<jca:addServiceArgument type="wt.part.WTPart"
value="${param.oid}" />
</jca:getModel>
<%-->Get the NmHTMLTable from the command<--%>
<jca:renderTable model="${tableModelRefDocs}"
helpContext="doc_references" showCount="true" />
<%--> Table 2 - Described by Documents <--%>
<fmt:message var="relatedDescribedDocTableLabel" key="<%= partResource.DESCRIBED_BY_DOC_TABLE_HEADER %>" />
<jca:describeTable var="relatedDescibeDocs"
id="part.relatedPartsDescribedByDocuments.list"
type="wt.doc.WTDocument"
label="${relatedDescribedDocTableLabel}"
configurable="true" >
<jca:setComponentProperty key="selectable" value="true"/>
<jca:describeColumn id="type_icon" />
<jca:describeColumn id="number"/>
<jca:describeColumn id="version" />
<jca:describeColumn id="infoPageAction" sortable="false" />
<jca:describeColumn id="name" />
<jca:describeColumn id="containerName" />
<jca:describeColumn id="state" />
<jca:describeColumn id="lastModified"/>
<jca:describeColumn id="nmActions">
<jca:setComponentProperty key="actionModel" value="relatedParts DescRef actions"/>
</jca:describeColumn>
</jca:describeTable>
<%-->Get a component model for our table<--%>
<jca:getModel var="tableModelDescDocs" descriptor="${relatedDescibeDocs}"
serviceName="com.ptc.windchill.enterprise.part.commands.PartDocServiceCommand"
methodName="getAssociatedDescribeDocuments" >
<jca:addServiceArgument type="wt.part.WTPart" value="${param.oid}" />
value="${param.oid}" />
</jca:getModel>

<%-->Get the NmHTMLTable from the command<--%>
<jca:renderTable model="${tableModelDescDocs}" helpContext="doc_described_by_ref" showCount="true" />
<%@ include file="/netmarkets/jsp/customTable/customTable3.jsp"%>
<%@ include file="/netmarkets/jsp/util/end.jspf"%>
customTable3.jsp
<%-->Get the Described By relation NmHTMLTable from the command<--%>
<jca:describeTable var="described" id="part.relatedPartsDescribedByCADDocuments.list" type="wt.epm.EPMDocument"
label="${describedByCADDocTableHeader}"
configurable="true">
<jca:describeColumn id="type_icon"/>
<jca:describeColumn id="number"/>
<jca:describeColumn id="CADName"/>
<jca:describeColumn id="version" />
<jca:describeColumn id="infoPageAction" />
<jca:describeColumn id="name"/>
<jca:describeColumn id="containerName"/>
<jca:describeColumn id="association"/>
<jca:describeColumn id="state"/>
<jca:describeColumn id="lastModified"/>
<jca:describeColumn id="nmActions">
<jca:setComponentProperty key="actionModel" value="EMPTY_ACTION_MODEL"/>
</jca:describeColumn>
</jca:describeTable>
<%-->Get a component model for our table<--%>
<jca:getModel var="tableModelDesc" descriptor="${described}"
serviceName="com.ptc.windchill.enterprise.part.commands.PartDocServiceCommand"
methodName="getAssociatedCADDocuments" >
<jca:addServiceArgument type="wt.part.WTPart" value="${param.oid}"/>
</jca:getModel>
<%-->Get the NmHTMLTable from the command<--%>
<jca:renderTable model="${tableModelDesc}" pageLimit="0" showCount="true" helpContext="cad_doc_described_by_ref" />
これは役に立ちましたか?