<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>CFTREEITEM</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">CFTREEITEM</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>
cftree タグによって作成されたフォームツリーコントロールに 1 つ以上の要素を挿入します。 
</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;cftreeitem
   value = &quot;text&quot;
   display = &quot;text&quot;
   parent = &quot;parent_name&quot;
   img = &quot;filename&quot;
   imgopen = &quot;filename&quot;
   href = &quot;URL&quot;
   target = &quot;URL_target&quot;
   query = &quot;queryname&quot;
   queryAsRoot = &quot;yes&quot;、&quot;no&quot;
   expand = &quot;yes&quot;、&quot;no&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>
cfapplet、cfform、cfformgroup、cfformitem、cfgrid、cfinput、cfselect、cfslider、cftextarea、cftree、『ColdFusion MX 開発ガイド』の第27章の「cfform タグによるダイナミックフォームの作成」 の「cftree タグによるツリーコントロールの構築」
</p>
<table>
  <tr valign="top">
    <td width="30"><strong>メモ: </strong></td>
    <td>XML 形式では、ColdFusion MX はすべての属性を XML に渡します。用意された XSLT スキンでは XML 形式のツリーは処理または表示されませんが、アプレットおよび Flash 形式のツリーは表示されます。</td>
  </tr>
</table>
<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>
このタグを使用する場合は、クライアントで Java アプレットをダウンロードする必要があります。アプレットのダウンロードには時間がかかるため、このタグを使用すると、同じ情報を取得するのに HTML の form 要素や cfinput タグを使用する場合よりも処理速度が少し遅くなる可能性があります。 
</p>

<p>
このタグを正しく動作させるには、JavaScript 対応のブラウザを使用する必要があります。 
</p>

<p>
このタグに挿入するためにクエリーを使用しない場合は、単一のツリー項目が作成されます。クエリーを使用する場合は、複数の項目が作成されます。クエリーの各行では、階層的にネストされた項目のセットが列ごとの 1 項目について作成されます。
</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>
次の例では、単一の cftreeitem タグおよびクエリーを使用してシンプルなツリーを作成します。
</p>
<pre>&lt;cfform action = &quot;#cgi.script_name#&quot;&gt;
   &lt;cftree name = &quot;Employees&quot; height = &quot;400&quot; width = &quot;200&quot;&gt;
      &lt;cftreeitem value=&quot;LastName, FirstName, Emp_ID&quot; query=&quot;getEmployees&quot;
       queryAsRoot=&quot;False&quot;&gt;
   &lt;/cftree&gt;
&lt;/cfform&gt;
</pre>
<p>
次の例では、部門別に構成された、組織内の全従業員に関する基本情報を示すツリーを作成します。部門を展開すると、全従業員が表示されます。プラス記号 (+) をクリックすると、追加情報が表示されます。従業員名をクリックすると、同じページに戻り、選択した従業員の ID が表示されます。
</p>
<pre>&lt;!--- データソースにクエリーを実行して、従業員情報を取得します。---&gt;
&lt;!--- 出力を部門別にグループ化します  
   (Group By 節にはすべてのフィールドが必要です)。 ---&gt;
&lt;cfquery name = &quot;GetEmployees&quot; dataSource = &quot;cfdocexamples&quot;&gt;
   SELECT  Emp_ID, FirstName, LastName, EMail, Phone, Department
   FROM Employees
   GROUP BY Department, Emp_ID, FirstName, LastName, EMail, Phone
&lt;/cfquery&gt;
&lt;html&gt;
&lt;body&gt;
&lt;h3&gt;cftreeitem の例&lt;/h3&gt;

&lt;!--- ツリー内のリンクをクリックすると、次の処理が実行されます。 
   アプリケーション全体で追加処理に ID を使用します。 ---&gt;
&lt;cfif isdefined(&quot;URL.user_ID&quot;)&gt;
   &lt;cfoutput&gt;
      &lt;!--- URL.cftreeitemkey は選択されたツリー項目の value 属性です。 ---&gt;
      #URL.cftreeitemKey#; User ID #URL.user_ID# の情報をリクエストしました。
   &lt;/cfoutput&gt;
   &lt;br&gt;&lt;br&gt;
&lt;/cfif&gt;
&lt;!--- ツリーを表示します。cfform 内に cftree タグが必要です。 ---&gt;
&lt;cfform&gt;
   &lt;cftree name = &quot;Employees&quot; height = &quot;400&quot; width = &quot;200&quot;
      font = &quot;Arial Narrow&quot; highlighthref=&quot;No&quot; hscroll=&quot;No&quot;&gt; 
      &lt;!--- group 属性を使用する cfoutput タグが部門をループします。 ---&gt;
      &lt;cfoutput group=&quot;Department&quot; query = &quot;GetEmployees&quot;&gt;
         &lt;cftreeitem value=&quot;#Department#&quot; parent=&quot;Employees&quot; expand=&quot;yes&quot;&gt;
         &lt;!--- この cfoutput タグが部門のレコードをループします。
               cfouput タグには属性は必要ありません。 ---&gt;
         &lt;cfoutput&gt;
            &lt;!--- 部門内の各従業員に対して項目を作成します。
               子は展開しません。各従業員名はこのページにリンクし、
               クエリー文字列内の従業員 ID を送信します。---&gt;
            &lt;cftreeitem value = &quot;#LastName#, #FirstName#&quot;
               display = &quot;#LastName#, #FirstName#&quot;
               parent = &quot;#Department#&quot; expand=&quot;no&quot;
               href=&quot;#cgi.script_name#?user_id=#emp_id#&quot;&gt;
            &lt;!--- 各従業員エントリには、ID および ContactInfo の子があります。 ---&gt;
            &lt;cftreeitem value = &quot;#Emp_ID#&quot; display = &quot;Employee ID:#Emp_ID#&quot;
               parent = &quot;#LastName#, #FirstName#&quot;&gt;
            &lt;!--- 各ノードは固有の値である必要があるため、Emp_ID om 値を使用します。 ---&gt;
            &lt;cftreeitem value = &quot;#Emp_ID#_ContactInfo&quot; 
               display = &quot;Contact Information&quot;
               parent = &quot;#LastName#, #FirstName#&quot; expand = &quot;No&quot;&gt;
            &lt;!--- ContactInfo には 2 つの子があります。 ---&gt;
            &lt;cftreeitem value = &quot;#Phone#&quot; parent = &quot;#Emp_ID#_ContactInfo&quot;&gt;
            &lt;cftreeitem value = &quot;#Email#&quot; parent = &quot;#Emp_ID#_ContactInfo&quot;&gt;
         &lt;/cfoutput&gt;
      &lt;/cfoutput&gt;
   &lt;/cftree&gt;
&lt;/cfform&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="VALUE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">VALUE</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">
  <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>cfform を実行するときに渡される値です。cfquery からのデータをツリーに挿入する場合、区切りリストで使用する複数の列を指定できます。たとえば、value = &quot;dept_id,emp_id&quot; と指定します。この場合、各列では、リスト内でその列の後に配置される子となる項目が生成されます。</p>

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


<p>ツリー項目のラベルです。クエリーからのデータをツリーに挿入する場合は、名前を区切りリストで指定します。例 : display = &quot;dept_name,emp_name&quot;</p>

  </td>
  </tr>
  </table>
</div>
<div id="PARENT">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">PARENT</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">
  <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>ツリー項目の親の値です。ツリー階層における項目の配置を指定します。省略した場合、その項目はツリーのルートレベルに配置されます。または、queryAsRoot 属性が true の場合、クエリーの直下に配置されます。</p>

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


<p>ツリー項目のアイコンの、イメージ名、ファイル名、またはファイルの URL です。 </p>
<p>次の値があります。</p><ul>

<li>cd</li>

<li>computer</li>

<li>document</li>

<li>element</li>

<li>folder</li>

<li>floppy</li>

<li>fixed</li>

<li>remote</li>
</ul>

<p>カスタムイメージを指定することもできます。パスおよびファイル拡張子を含めて指定します。例 :  </p>
<p>img = &quot;../images/page1.gif&quot;</p>
<p>カスタムイメージは、Flash 形式の場合はサポートされません。</p>
<p>1 つのツリー内への複数のイメージの指定や、2 番めまたは後続のレベルのイメージの指定には、各レベルに対応する名前カンマ区切りで指定します。例 : </p>
<p>img = &quot;folder,document&quot;</p>
<p>img = &quot;,document&quot; (2 番めのレベルの指定)</p>

  </td>
  </tr>
  </table>
</div>
<div id="IMGOPEN">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">IMGOPEN</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">
  <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>img 属性の説明のように、開かれたツリー項目に表示されるアイコンです。</p>

  </td>
  </tr>
  </table>
</div>
<div id="HREF">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">HREF</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">
  <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>ユーザーがツリー項目をクリックしたときのリンク先の URL です。query 属性を使用する場合は、URL を含むクエリー列を href 属性で指定できます。href がクエリー列でない場合、属性のテキストは URL または URL のリストでなければなりません。 </p>
<p>クエリーからのデータをツリーに挿入する場合は、カンマ区切りリストで URL を指定できます。例 : </p>
<p>href = &quot;http://dept_svr,http://emp_svr&quot;</p>

  </td>
  </tr>
  </table>
</div>
<div id="TARGET">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TARGET</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">
  <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>href URL のターゲット属性です。クエリーからのデータをツリーに挿入する場合、ターゲットを区切りリストで指定します。</p>
<p>target = &quot;FRAME_BODY,_blank&quot;</p>

  </td>
  </tr>
  </table>
</div>
<div id="QUERY">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">QUERY</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">
  <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">
  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Flash</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>ツリー項目を挿入するときに使用するクエリー名です。ColdFusion では、value 属性で指定されるクエリー列リスト内のフィールド値ごとに項目が生成されます。各行のフィールドは、最初の列に階層的にリンクされます。</p>

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


<p>query 属性を指定した場合に限り適用されます。このタグによって生成されるすべての項目に対して、ルートレベルとしてクエリーを定義します。この属性を使用することにより、親 cftreeitem を作成しなくても済むようになります。</p><ul>

<li>Yes: このタグによって生成される他のすべての項目に対して、クエリー名をその値として、親 (ルート) 項目を生成します。parent 属性を指定した場合、このルート項目は指定した親の子になります。</li>

<li>No: このタグによって生成されるすべての項目の直接の親として parent 属性で指定された項目を使用します。parent 属性がない場合は、クエリーを親として使用します。</li>

<li>任意の文字列: ルート項目を作成し、指定された文字列を項目名として使用します。parent 属性を使用する場合、ルート項目は指定された親の子になります。</li>
</ul>


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

<ul>

<li>Yes: ツリーが展開されてツリー項目の子項目が表示されます。</li>

<li>No: ツリー項目が閉じた状態で保持されます。</li>
</ul>


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

  </body>
</html>
