<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CFASSOCIATE</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="説明">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CFASSOCIATE</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">説明</span>
<p>
サブタグデータをベースタグと共に保存できるようにします。この機能は、カスタムタグに対してのみ有効です。 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">カテゴリ</span>
<p>
アプリケーションフレームワークタグ
</p>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="syntax"><span class="title">シンタックス</span><pre>&lt;cfassociate
   baseTag = &quot;base_tag_name&quot;
   dataCollection = &quot;collection_name&quot;&gt;
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">関連項目</span>
<p>
cfapplication、cferror、cflock、cfmodule、『ColdFusion MX 開発ガイド』の第11章の「カスタム CFML タグの作成と使用方法」 の「高レベルのデータ交換」
</p>

<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">使用方法</span>
<p>
ベースタグ内にサブタグデータを保存するには、このタグをサブタグ内から呼び出します。
</p>

<p>
ColdFusion では、サブタグ属性がベースタグに渡されると、それらはデフォルト名が AssocAttribs の構造体に保存されます。複数のサブタグを指定できるベースタグ内にサブタグ属性を区別して保存するには、dataCollection 属性に構造体名を指定します。この構造体は、thistag.collectionName という配列に追加されます。
</p>

<p>
カスタムタグコード内では、attributeCollection 属性を使用してタグに渡された属性は、それぞれ独立した値として保存され、それらの属性がカスタムタグの呼び出し側によって構造体にグループ化されたことは示されません。したがって、呼び出されたタグでは、特定の属性に値を割り当てた場合、サブタグの呼び出し時に使用した attributeCollection 属性内に渡された値が置き換えられます。
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">例</span><pre>&lt;!--- コンテキストを検索します。 ---&gt;
&lt;cfif thisTag.executionMode is &quot;start&quot;&gt;
 &lt;!--- 属性を割り当てます。 ---&gt;
 &lt;cfassociate baseTag = &quot;CF_TAGBASE&quot;&gt;

 &lt;!--- 属性のデフォルト値を定義します。 ---&gt;
 &lt;cfparam name = &quot;attributes.happy&quot; default = &quot;yes&quot;&gt;
 &lt;cfparam name = &quot;attributes.sad&quot; default = &quot;no&quot;&gt;
...
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="BASETAG">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">BASETAG</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">必須</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>ベースタグ名です。</p>

  </td>
  </tr>
  </table>
</div>
<div id="DATACOLLECTION">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DATACOLLECTION</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "AssocAttribs"


<p>ベースタグ内にサブタグデータを保管するための構造体です。</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
