基本的なカスタマイズ > ユーザーインタフェースのカスタマイズ > UI の情報の表示 > UI の検証 > ソリューション > 手順 - 事前検証 > 検証フィルタの実装 > 操作のフィルタへの関連付けと関連付け解除
  
操作のフィルタへの関連付けと関連付け解除
フィルタを作成し、登録した後、最後に行うのは、操作とシンプルフィルタとの関連付け、または操作とユニバーサルフィルタとの関連付け解除です。これは、*actions.xml で行います。
ユニバーサルフィルタからの操作の関連付け解除
特定の操作にグローバルフィルタを適用したくない場合は、除外する操作を*acitons.xml に入れ、それを更新して、以下のように excludeFilter エレメントを含める必要があります。
<objecttype name="navigation" class=""
resourceBundle="com.ptc.core.ui.navigationRB">
<action name="home" renderType="GENERAL">
<command class="netmarkets"
method="servlet/Navigation?tab=home" windowType="page"/>
<excludeFilter name="markedForDelete" />
</action>
<action name="program" renderType="GENERAL">
<command class="netmarkets"
method="servlet/Navigation?tab=program"windowType="page"/>
<excludeFilter name="markedForDelete" />
</action>
<action name="product" renderType="GENERAL">
<command class="netmarkets"
method="servlet/Navigation?tab=product" windowType="page"/>
<excludeFilter name="markedForDelete" />
</action>
...
* 
excludeFilter エレメントの name 属性は、*service.properties.xconf へのフィルタの登録に使用した selector と対応する必要があります。
操作のシンプルフィルタへの関連付け
(仮定で) 問題レポートが特定のステータスである場合に操作を無効にするシンプルフィルタを ProblemReportStatusFilter という名前で作成し、登録した ("problemReportStatus" セレクタを使用して登録した) とします。また、それを少数の操作に適用するとします。フィルタを適用する操作は *actions.xml に入っているので、それを修正して、以下のように includeFilter エレメントを含めます。
<objecttype name="problemReport" class="wt.change2.WTChangeIssue"
resourceBundle="com.ptc.windchill.enterprise.change2.changeManagem
entActionsRB">
<action name="create" >
<command class=…/>
<includeFilter name="problemReportStatus" />
</action>
<action name="edit" >
<command class=…/>
<includeFilter name="problemReportStatus" />
</action>
<action name="editModifyContentOnly"
id="editModifyContentOnly">
<command class="…/>
<includeFilter name="problemReportStatus" />
</action>
...
* 
この場合も、includeFilter エレメントの name 属性は、*service.properties.xconf へのフィルタの登録に使用したセレクタと対応する必要があります。
同一操作に対する複数フィルタの追加/除外
理論的には、操作は関連付けを解除された任意の数のユニバーサルフィルタと関連付けられた任意の数のシンプルフィルタを持つことができます。必要な数の includeFilter と excludeFilter エレメントを *actions.xml に追加するだけです。
以下に例を示します。
<action name="removeChangeTask" renderType="GENERAL" ajax="row">
<command onClick="removeChangeTask(event)"
windowType="no_content" />
<includeFilter name="problemReportStatus />
<excludeFilter name="markedForDelete" />
<includeFilter name="someSimpleFilter" />
<excludeFilter name="someUniversalFilter" />
...
</action>
* 
includeFilter と excludeFilter エレメントの順序は不同です。フィルタが呼び出される順序に影響することもありません。