<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>CFMODULE</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">CFMODULE</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>
ColdFusion アプリケーションページで使用するカスタムタグを呼び出します。このタグにより、カスタムタグの名前の重複が処理されます。
</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;cfmodule
   template = &quot;path&quot;
   name = &quot;tag_name&quot;
   attributeCollection = &quot;collection_structure&quot;
   attribute_name1 = &quot;valuea&quot;
   attribute_name2 = &quot;valueb&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、cfassociate、cflock、『ColdFusion MX 開発ガイド』の第11章の「カスタム CFML タグの作成と使用方法」 
</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>
ColdFusion&#160;MX: このタグをカスタムタグ内で使用したときの動作が変更されました。attribute_name パラメータが attributeCollection パラメータ内の key 要素と同じである場合は、attributeCollection パラメータ内の name 値が使用されるようになりました。以前のリリースでは、この処理は一貫していませんでした。
</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>
カスタムタグ定義が含まれている ColdFusion ページにパスを含めた名前を付けるには、template 属性を使用します。位置をドット表記で示して ColdFusion インストールディレクトリ内のカスタムタグを参照するには、name 属性を使用します。 
</p>

<p>
UNIX システムでは、まず、name 属性と一致するファイル (ただしすべて小文字) が検索されます。該当するファイルが見つからない場合は、大文字と小文字の区別も含めて属性と一致するファイル名が検索されます。
</p>

<p>
同じ呼び出し内で、attributeCollection と attribute_name を使用することができます。 
</p>

<p>
カスタムタグコード内では、attributeCollection を使用して渡された属性は独立した属性値として保存され、その属性がカスタムタグの呼び出しによって構造体にグループ化されたことは示されません。
</p>

<p>
同様に、カスタムタグが cfassociate タグを使用してその属性を保存している場合、attributeCollection によって渡された属性は独立した属性値として保存され、その属性がカスタムタグの呼び出しによって構造体にグループ化されたことは示されません。
</p>

<p>
終了タグを cfmodule に指定する場合、ColdFusion では開始タグと終了タグの両方がある場合と同様にカスタムタグを呼び出します。詳細については、『ColdFusion MX 開発ガイド』の第11章の「カスタム CFML タグの作成と使用方法」 で「終了タグの処理」を参照してください。
</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;h3&gt;cfmodule の例&lt;/h3&gt;
&lt;p&gt;この参照専用の例では、カスタムタグをインラインで呼び出すための cfmodule の使用方法を示します。&lt;/p&gt;
&lt;p&gt;この例では、snippets ディレクトリの myTag.cfm に保存されているサンプルのカスタムタグを使用します。
また、ColdFusion のカスタムタグは、CFusionMX7CustomTags ディレクトリに保存することができます。
&lt;cfset attrCollection1 = StructNew()&gt;
&lt;cfparam name=&quot;attrCollection1.value1&quot; default=&quot;22&quot;&gt;
&lt;cfparam name=&quot;attrCollection1.value2&quot; default=&quot;45&quot;&gt;
&lt;cfparam name=&quot;attrcollection1.value3&quot; default=&quot;88&quot;&gt;
&lt;!--- Name と共に CFMODULE を使ってタグを呼び出す ---&gt;
&lt;cfmodule
   Template=&quot;myTag.cfm&quot;
   X=&quot;3&quot;
   attributeCollection=#attrCollection1#
   Y=&quot;4&quot;&gt;
&lt;!--- コードを表示します。 ---&gt;
&lt;HR size=&quot;2&quot; color=&quot;#0000A0&quot;&gt;
&lt;P&gt;これは、TEMPLATE 属性を使って、
カスタム タグを呼び出す方法です。&lt;/P&gt;
&lt;cfoutput&gt;#HTMLCodeFormat(&quot; &lt;CFMODULE
   Template=&quot;&quot;myTag.cfm&quot;&quot;
   X=3
   attributeCollection=##attrCollection1##
   Y=4&gt;&quot;)#
&lt;/cfoutput&gt;
&lt;P&gt;結果 : &lt;cfoutput&gt;#result#&lt;/cfoutput&gt;
&lt;!--- Name と共に CFMODULE を使ってタグを呼び出します。---&gt;
&lt;!---
   &lt;CFMODULE
      Name=&quot;myTag&quot;
      X=&quot;3&quot;
      attributeCollection=#attrCollection1#
      Y=&quot;4&quot;&gt;
---&gt;
&lt;!--- コードを表示します。 ---&gt;
&lt;HR size=&quot;2&quot; color=&quot;#0000A0&quot;&gt;
&lt;P&gt;これは、NAME 属性を使って、
カスタム タグを呼び出す別の方法です。&lt;/P&gt;
&lt;cfoutput&gt;#HTMLCodeFormat(&quot; &lt;CFMODULE
      NAME=&#39;myTag&#39;
      X=3
      attributeCollection=##attrCollection1##
      Y=4&gt;&quot;)#
&lt;/cfoutput&gt;
&lt;P&gt;結果 :&lt;cfoutput&gt;#result#&lt;/cfoutput&gt;
&lt;!--- ショートカット表記を使用してタグを呼び出します。 ---&gt;
&lt;!---
&lt;CF_myTag
   X=&quot;3&quot;
   attributeCollection=#attrCollection1#
   Y=&quot;4&quot;&gt;
---&gt;


&lt;!--- コードを表示します。 ---&gt;   
&lt;p&gt;これは、同じタグを呼び出すショートカットです。&lt;/p&gt;
&lt;cfoutput&gt;#HTMLCodeFormat(   &quot;&lt;cf_mytag
   x = 3
   attributeCollection = ##attrcollection1##
   y = 4&gt;&quot;)#
&lt;/cfoutput&gt;   
&lt;p&gt;結果 : &lt;cfoutput&gt;#result#&lt;/cfoutput&gt;&lt;/p&gt;   
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="TEMPLATE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TEMPLATE</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">name 属性が使用されない場合は必須</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>name 属性とは排他の関係です。タグを実装するページへのパスです。 </p><ul>

<li>相対パスは、現在のページから展開されます。</li>

<li>絶対パスは、ColdFusion のマッピングを使用して展開されます。</li>
</ul>

<p>物理パスは有効ではありません。 </p>

  </td>
  </tr>
  </table>
</div>
<div id="NAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">NAME</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">template 属性が使用されない場合は必須 </td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>template 属性とは排他の関係です。カスタムタグ名で、&quot;Name.Name.Name...&quot; の形式で指定します。ColdFusion タグのルートディレクトリの下の、カスタムタグページが含まれているサブディレクトリを特定します。例 : (Windows 形式の場合) </p><pre>&lt;cfmodule name = &quot;macromedia.Forums40.<br>
GetUserOptions&quot;&gt; 
</pre>
<p>これにより、ColdFusion ルートディレクトリの下にあるディレクトリ CustomTagsmacromediaForums40 内のページ GetUserOptions.cfm が特定されます。</p>

  </td>
  </tr>
  </table>
</div>
<div id="ATTRIBUTECOLLECTION">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">ATTRIBUTECOLLECTION</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="ATTRIBUTE_NAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">ATTRIBUTE_NAME</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>

  </body>
</html>
