高度なカスタマイズ > ビジネスロジックのカスタマイズ > レポートの生成 > レポート選択リストのカスタマイズ > PSB リボンのカスタマイズ
  
PSB リボンのカスタマイズ
PSB リボンツールバーの「レポート」メニューの下にカスタムレポートを追加できます。
これは部品の情報ページの「構造」タブ (PSB) にある「レポート」メニューにのみ適用され、その他の構造ではサポートされていません。
最大 25 個のカスタムレポートを追加できます
カスタムレポートは既存の OOTB レポートの末尾に追加する必要があります
OOTB レポートのリスト内にカスタムレポートを挿入することはできません
既存の OOTB レポートの順序を変更することはできません
OOTB レポートを非表示にしてカスタムレポートだけを表示できます
カスタマイズのステップ
1. リソースバンドル Java ファイルを作成します。次に例を示します。
a. ディレクトリ <Windchill>\src\com\customReports\psb\ を作成し、psbCustomActionsRB.java という名前のファイルを作成します (下のサンプルソースコードを参照してください)。
b. Windchill シェルで、ディレクトリ <Windchill>\src に移動し、java ファイルをコンパイルします (<Windchill> を適宜置き換えます)。
javac -cp <Windchill>\codebase;<Windchill>\codebase\WEB-INF\lib\*;<Windchill>\lib\* com\customReports\psb\psbActionsRB.java -d <Windchill>\codebase
次に例を示します。
javac -cp C:\ptc\Windchill\codebase;C:\ptc\Windchill\codebase\WEB-INF\lib\*;C:\ptc\Windchill\lib\* com\customReports\psb\psbActionsRB.java -d C:\ptc\Windchill\codebase
これによって RB 情報ファイルがディレクトリ <Windchill>\codebase\com\customReports\psb にコンパイルされます。
* 
リソースバンドルの詳細については、リソース情報 (.rbInfo) ファイルを参照してください。
2. 操作定義エントリを <Windchill>\codebase\config\actions\custom-actions.xml に追加します (下のサンプルソースコードを参照してください)。
a. 各操作の URL パラメータを変更してカスタムレポートの URL を指定する必要があります。
b. 注記: <objecttype name="psb" resourceBundle="com. customReports.psb.psbActionsRB"> エレメントに指定されている resourceBundle が、前述のステップ 1 で作成したリソースバンドルの Java クラス名と一致している必要があります。
3. 操作モデル定義を <Windchill>\codebase\config\actions\custom-actionModels.xml に追加します (下のサンプルソースコードを参照してください)。
a. 注記: これは <Windchill>\codebase\config\actions\psb-actionModels.xml にある PSB のツールバー操作モデル定義をオーバーライドします。psb-actionModels.xml を修正するその他のパッチがインストールされた場合、これらの変更をファイル custom-actionModels.xml にマージする必要があります。
b. 黄色でハイライトされているセクションで必要なカスタムレポートの番号をコメント解除します。
c. "separator" エントリはオプションであり、任意のカスタムレポートエントリ間に配置できます。
d. 操作の名前を変更しないでください。
e. OOTB レポートエントリをコメント化できます。
サンプルコード: psbCustomActionsRB.java
* 
カスタムレポート 02 から 25 までのサンプルコードは読みやすくするために除去されています。
package com.customReports.psb;
import wt.util.resource.RBComment;
import wt.util.resource.RBEntry;
import wt.util.resource.RBPseudo;
import wt.util.resource.RBUUID;
import wt.util.resource.WTListResourceBundle;
@RBUUID("com.customReports.psb.psbCustomActionsRB")
public final class psbCustomActionsRB extends WTListResourceBundle {
/********
* Custom Report 01
*/
@RBEntry("Custom Report 01 Description")
// this is what is displayed in the menu
public static final String PSB_CUSTOMREPORTGWT01_DESCRIPTION
= "psb.psbCustomReportGWT01.description";
@RBEntry("Custom Report 01")
// not used, but is here for completeness in case used in the future
public static final String PSB_CUSTOMREPORTGWT01_TITLE
= "psb.psbCustomReportGWT01.title";
@RBEntry("Custom Report 01 Tooltip")
// not used, but is here for completeness in case used in the future
public static final String PSB_CUSTOMREPORTGWT01_TOOLTIP
= "psb.psbCustomReportGWT01.tooltip";
@RBEntry("height=900,width=1000")
// specifies the size in pixels of the report window
@RBPseudo(false)
@RBComment("DO NOT TRANSLATE")
public static final String PSB_CUSTOMREPORTGWT01_MOREURLINFO
= "psb.psbCustomReportGWT01.moreurlinfo";
@RBEntry("report_view.png")
// the name of the icon file, as found in <Windchill>/netmarkets/images
@RBPseudo(false)
@RBComment("DO NOT TRANSLATE")
public static final String PSB_CUSTOMREPORTGWT01_ICON
= "psb.psbCustomReportGWT01.icon";

[ Sample code for custom reports 02 through 25 removed for readability ]
} // end class
package com.customReports.psb;
import wt.util.resource.RBComment;
import wt.util.resource.RBEntry;
import wt.util.resource.RBPseudo;
import wt.util.resource.RBUUID;
import wt.util.resource.WTListResourceBundle;
@RBUUID("com.customReports.psb.psbCustomActionsRB")
public final class psbCustomActionsRB extends WTListResourceBundle {
/********
* Custom Report 01
*/
@RBEntry("Custom Report 01 Description")
// this is what is displayed in the menu
public static final String PSB_CUSTOMREPORTGWT01_DESCRIPTION
= "psb.psbCustomReportGWT01.description";
@RBEntry("Custom Report 01")
// not used, but is here for completeness in case used in the future
public static final String PSB_CUSTOMREPORTGWT01_TITLE
= "psb.psbCustomReportGWT01.title";
@RBEntry("Custom Report 01 Tooltip")
// not used, but is here for completeness in case used in the future
public static final String PSB_CUSTOMREPORTGWT01_TOOLTIP
= "psb.psbCustomReportGWT01.tooltip";
@RBEntry("height=900,width=1000")
// specifies the size in pixels of the report window
@RBPseudo(false)
@RBComment("DO NOT TRANSLATE")
public static final String PSB_CUSTOMREPORTGWT01_MOREURLINFO
= "psb.psbCustomReportGWT01.moreurlinfo";
@RBEntry("report_view.png")
// the name of the icon file, as found in <Windchill>/netmarkets/images
@RBPseudo(false)
@RBComment("DO NOT TRANSLATE")
public static final String PSB_CUSTOMREPORTGWT01_ICON
= "psb.psbCustomReportGWT01.icon";

[ Sample code for custom reports 02 through 25 removed for readability ]
} // end class
サンプルコード: custom-actions.xml
resourceBundle パラメータにリソースバンドルの Java クラス名が正しく設定されていることを確認してください。
* 
カスタムレポート 02 から 25 までのサンプルコードは読みやすくするために除去されています。
<listofactions>
<objecttype name="psb"
resourceBundle="com.customReports.psb.psbCustomActionsRB">
<action name="psbCustomReportGWT01" ajax="component">
<command class="com.ptc.cat.ui.client.action.LaunchURLAction"
method="execute" url="/ptc1/psb/customAction" windowType="popup"/>
<supportedTypes>
<type value="wt.part.WTPart"/>
<type value="wt.part.WTPartUsageLink"/>
<type value="wt.part.PartUsesOccurrence"/>
<type value="wt.part.RTPartPathOccurrence"/>
</supportedTypes>
</action>
[ Sample code for custom reports 02 through 25 removed for readability ]
</objecttype>
</listofactions>
サンプルコード: custom-actionModels.xml
以下で黄色でハイライトされているセクションで必要なカスタムレポートの番号をコメント解除します。"separator" エントリはオプションであり、任意のカスタムレポートエントリ間に配置できます。操作の名前を変更しないでください。
* 
psbCustomReportGWT 操作名のコードのセクションで必要なカスタムレポートの番号をコメント解除します。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE actionmodels SYSTEM "actionmodels.dtd">
<actionmodels>
<model name="psbRelatedPartsTreeToolBar">
<action name="editingGroupGWT" type="psb" />
<action name="insertExistingPartStructureGWT" type="psb" />
<action name="removeGWT" type="psb" />
<action name="insertNewPartStructureSplitGWT" type="psb" />
<action name="insertNewPartStructureGWT" type="psb" />
<action name="insertMultiNewPartStructureGWT" type="psb" />
<action name="editSplitGWT" type="psb" />
<action name="editGWT" type="psb" />
<action name="editUsageLinkTreeGWT" type="psb" />
<action name="editCommonAttrsGWT" type="psb" />
<action name="separator" type="separator" />
<action name="renameGWT" type="psb" />
<action name="createOccurrencesGWT" type="psb" />
<action name="checkInOutGroupGWT" type="psb" />
<action name="checkoutGWT" type="psb" />
<action name="undocheckoutGWT" type="psb" />
<action name="checkinGWT" type="psb" />
<action name="findCheckoutItemsGWT" type="psb" />
<action name="clipboardGroupGWT" type="psb" />
<action name="pasteFromClipboardToTreeWithLargeIconGWT" type="psb" />
<action name="copyToWindchillWithLargeIconGWT" type="cat" />
<action name="pasteFromClipboardToTreeGWT" type="psb" />
<action name="pasteSelectToTreeGWT" type="psb" />
<action name="viewingGroupGWT" type="psb" />
<action name="relatedObjectsWithLargeIconGWT" type="psb" />
<action name="configurableTableViewGWT" type="cat" />
<action name="configurableTableViewListGWT" type="cat" />
<action name="separator" type="separator" />
<action name="saveStructureViewGWT" type="cat" />
<action name="configurableTableViewManagerGWT" type="cat" />
<action name="separator" type="cat" />
<action name="sourcingContextGWT" type="psb" />
<action name="sourcingContextListGWT" type="psb" />
<action name="separator" type="cat" />
<action name="findSourcingContextGWT" type="psb" />
<action name="displayGWT" type="cat" />
<action name="displayOccurrencesGWT" type="psb" />
<action name="separator" type="separator" />
<action name="selectAllGWT" type="cat" />
<action name="separator" type="separator" />
<action name="expandAllLevelsFromRootGWT" type="cat" />
<action name="psbExpandSubmenuGWT" type="psb" />
<action name="expandOneLevelGWT" type="cat" />
<action name="expandTwoLevelsGWT" type="cat" />
<action name="expandThreeLevelsGWT" type="cat" />
<action name="expandFourLevelsGWT" type="cat" />
<action name="expandFiveLevelsGWT" type="cat" />
<action name="separator" type="separator" />
<action name="expandAllSelectedLevelsGWT" type="cat" />
<action name="expandNLevelsGWT" type="cat" />
<action name="collapseAllLevelsGWT" type="cat" />
<action name="psbEndExpandSubmenuGWT" type="psb" />
<action name="separator" type="separator" />
<action name="viewLayout2Panel" type="cat" />
<action name="viewLayout3Panel" type="cat" />
<action name="separator" type="separator" />
<action name="refreshGWT" type="cat" />
<action name="newAddToGroupGWT" type="psb" />
<action name="newActionsGWT" type="psb" />
<action name="saveAsGWT" type="psb" />
<action name="separator" type="separator" />
<action name="newPromotionRequestTreeGWT" type="psb" />
<action name="newPartConfigGWT" type="psb" />
<action name="newRepresentationTreeGWT" type="psb" />
<action name="newPARGWT" type="psb"/>
<action name="addToActionsGWT" type="psb" />
<action name="addToBaselineGWT" type="cat" />
<action name="addToPackageGWT" type="cat" />
<action name="SBAddToPrj" type="cat" />
<action name="filterGroupGWT" type="ec" />
<action name="editFilterWithLargeIconGWT" type="ec" />
<action name="filterPropertiesGWT" type="ec" />
<action name="savedFiltersGWT" type="ec" />
<action name="toolsGroupGWT" type="psb" />
<action name="compareActionsGWT" type="psb" />
<action name="launchStructureCompareGWT" type="psb" />
<action name="launchCompareToCADGWT" type="dsv" />
<action name="openActionsGWT" type="psb" />
<action name="openInProductViewGWT" type="psb" />
<action name="openInPSEGWT" type="psb" />
<action name="openInMPSEGWT" type="psb" />
<action name="openInSPSEGWT" type="psb" />
<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="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="separator" type="separator" />
<action name="psbCustomReportGWT01" type="psb" />
<action name="psbCustomReportGWT02" type="psb" />
<action name="psbCustomReportGWT03" type="psb" />
<action name="psbCustomReportGWT04" type="psb" />
<action name="psbCustomReportGWT05" type="psb" />
<action name="separator" type="separator" />
<action name="psbCustomReportGWT06" type="psb" />
<action name="psbCustomReportGWT07" type="psb" />
<action name="psbCustomReportGWT08" type="psb" />
<action name="psbCustomReportGWT09" type="psb" />
<action name="separator" type="separator" />
<action name="psbCustomReportGWT10" type="psb" />
<action name="psbCustomReportGWT11" type="psb" />
<action name="psbCustomReportGWT12" type="psb" />
<action name="psbCustomReportGWT13" type="psb" />
<action name="psbCustomReportGWT14" type="psb" />
<action name="separator" type="separator" />
<action name="psbCustomReportGWT15" type="psb" />
<action name="psbCustomReportGWT16" type="psb" />
<action name="psbCustomReportGWT17" type="psb" />
<action name="separator" type="separator" />
<action name="psbCustomReportGWT18" type="psb" />
<action name="separator" type="separator" />
<action name="psbCustomReportGWT19" type="psb" />
<action name="psbCustomReportGWT20" type="psb" />
<action name="separator" type="separator" />
<action name="psbCustomReportGWT21" type="psb" />
<action name="psbCustomReportGWT22" type="psb" />
<action name="psbCustomReportGWT23" type="psb" />
<action name="psbCustomReportGWT24" type="psb" />
<action name="separator" type="separator" />
<action name="psbCustomReportGWT25" type="psb" />-->

<action name="exportActionsGWT" type="cat"/>
<action name="exportCsvGWT" type="cat" />
<action name="exportHtmlGWT" type="cat" />
<action name="exportPdfGWT" 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" />
</model>
</actionmodels>