基本的なカスタマイズ > ユーザーインタフェースのカスタマイズ > 操作の追加と UI への組み込み > タブモデル > 目的 > カスタマイズポイント > 手順 — ナビゲータをカスタマイズする > カスタムナビゲーションリスト委任を作成する
  
カスタムナビゲーションリスト委任を作成する
一般に、インタフェース NavigationListDelegate を直接実装することは推奨されていません。com.ptc.windchill.enterprise.navigation.delegates.DefaultNavigationListDelegate のように、既存のデフォルト実装の 1 つをサブクラス化する必要があります。
例:
public class MyTabNavigationListDelegate extends DefaultNavigationListDelegate {
/**
* Returns list of all the c.
*/
@Override
public Vector<ObjectVisitedInfo> getRecentStack(String node,
Vector<ObjectVisitedInfo> recent)
throws WTException {
// Specific code for getting all the contexts for that particular tab
return recent;
}
}
オーバーライドができそうなほかのメソッドがあるかもしれませんが、getRecentStack() がこの場合に必要な唯一のメソッドです。
MyTabNavigationListDelegate を登録する
このカスタム委任を登録するには、特定のカスタマイズした service.properties.xconf ファイルまたは site.xconf ファイルにプロパティを追加する必要があります。
前述の例では、以下のようにして登録します。
<Service name="com.ptc.jca.navigation.NavigationListDelegate">
<Option serviceClass="com.ptc.myTab.navigation.MyTabNavigationListDelegate"
requestor="java.lang.Object" selector="MyTab"/>
</Service>
登録後、windchill シェルで xconfmanager -p を実行して、メソッドサーバーを再起動する必要があります。