IBM FileNet P8, バージョン 5.2.1            

VWAttachmentPanel の操作

ここでは、VWAttachmentPanel Bean を操作して添付ファイルにアクセスする方法の例を示します。これらの添付ファイルは、Java™ ステップ・プロセッサーまたは Launch ステップ・プロセッサーによってオブジェクト・ストアに格納されます。

この VWAttachmentPanel をインスタンス化するメソッドは、以下のユーザーに役立ちます。
  • IDE を使用していない開発者
  • VWTabbedPane コントロールを使用せずに添付ファイルを取得する方法に興味のあるすべてのユーザー
VWTabbedPaneVWAttachmentPanel を含み、自動的に他のメニュー項目も提供します。次の手順では、VWTabbedPane から独立して VWattachmentPanel を使用する方法を示します。
注: 次のような状況では、VWAttachmentPanel コンポーネントをインスタンス化するためのコードが自動的に追加されます。
  • コンポーネントをフォームにドラッグするとき
  • IDE を使用しており、プロジェクトのクラスパスに vwpanel.jar を追加済みである場合
  1. 次の情報を渡して適切に Bean を初期化します。
    • VWStepElement オブジェクト
    • Frame オブジェクト (包含する側の親フレーム)
    • 有効な VWSession オブジェクト

    次の例では、クラス定義の先頭近くで以下の 3 つの変数を宣言し、初期化することを仮定しています。

       VWStepElement   vwStepElement = null;
       Frame   parentFrame = null;
       VWSession   vwSession = null; 
  2. 次のように、VWStepElement フィールド・タイプをテストした後で、VWAttachmentPanel Bean をインスタンス化します。
        JComponent  newJComponent = null;
    
        if (vwStepElement.getParameters(VWFieldType.FIELD_TYPE_ATTACHMENT, VWStepElement.FIELD_USER_DEFINED) != null)
            newJComponent = (JComponent)Beans.instantiate(getClass().getClassLoader(), "filenet.vw.toolkit.runtime.step.beans.VWAttachmentPanel");
        if (newJComponent != null)
    
        ¥¥While it is not shown here, you should include code to add the JComponent to the 
        ¥¥containing VWPanel to expose the attachment list to the end user. 
    
        if (newJComponent instanceof IVWStepProcessorComponent)
            ((IVWStepProcessorComponent)newJComponent).init(vwStepElement, parentFrame, vwSession);


最終更新日: 2015 年 10 月
working_with_vwattachmentpanel.htm

© Copyright IBM Corp. 2015.