16.12.3 動的リストの作成
動的リストは、SQL問合せまたは実行時に実行されるPL/SQLファンクションに基づいています。
16.12.3.1 動的リストの作成プロセスについて
動的リストにより、SQL問合せまたはSQL問合せを戻すPL/SQLファンクションからのアイテムに基づくリスト・コンポーネントを作成できます。これらの動的リストは、テーマのリスト・テンプレートを使用してページにレンダリングできます。
動的リストの作成プロセスでは、次のステップを実行します。
関連項目:
親トピック: 動的リストの作成
16.12.3.2 動的リスト構文の理解
SQL問合せまたはSQL問合せを戻すファンクションを使用して、動的リストを作成します。
SQL問合せの構文は、次のとおりです。
SELECT level, labelValue label, [targetValue] target, [is_current] is_current_list_entry, [imageValue] image, [imageAttributeValue] image_attribute, [imageAltValue] image_alt_attribute, [attribute1] attribute1, [attribute2] attribute2, [attribute3] attribute3, [attribute4] attribute4, [attribute5] attribute5, [attribute6] attribute6, [attribute7] attribute7, [attribute8] attribute8, [attribute9] attribute9, [attribute10] attribute10 FROM ... WHERE ... ORDER BY ...
SQL問合せを戻すファンクションの構文は、次のとおりです。
RETURN 'SELECT level, labelValue label,'|| ' [targetValue] target,'|| ' [is_current] is_current_list_entry,'|| ' [imageValue] image,'|| ' [imageAttributeValue] image_attribute, '|| ' [imageAltValue] image_alt_attribute,'|| ' [attribute1] attribute1,'|| ' [attribute2] attribute2,'|| ' [attribute3] attribute3,'|| ' [attribute4] attribute4,'|| ' [attribute5] attribute5,'|| ' [attribute6] attribute6,'|| ' [attribute7] attribute7,'|| ' [attribute8] attribute8,'|| ' [attribute9] attribute9,'|| ' [attribute10] attribute10'|| 'FROM ...'|| 'WHERE ...'|| 'ORDER BY ...';
内容は次のとおりです。
-
level
およびlabelvalue
が必要です。 -
level
: 階層リストで、level
パラメータを指定する必要があります。階層リスト以外では、このパラメータをNULL
に設定できます。 -
labelvalue
: リスト・エントリとして表示されるテキスト。 -
targetvalue
: リスト・エントリの選択時にブランチ先となるターゲットURL。 -
is_current
: リスト・エントリの動作を制御します。値は次のとおりです。-
NULL
: ターゲットの現行性はターゲットURLに基づきます。 -
'YES'
: リスト・エントリが常にカレントです。 -
'NO
': リスト・エントリがカレントではありません。
-
-
imagevalue
: リスト・エントリに表示されるイメージ名。 -
imageattributevalue
: 幅や高さなどのイメージの属性。 -
imagealtvalue
: ユーザーがイメージ上でクリックする必要のあるテンプレートでアクセシビリティに必要なイメージALT
タグの値。 -
attribute1
から10
: これらの属性は、静的リスト・エントリページで公開される既存の10のユーザー属性と一致します。
親トピック: 動的リストの作成
16.12.3.3 動的リストを最初から作成
動的リストを作成するには:
- リストの作成/編集ウィザードへのアクセス
- ワークスペースのホームページで、「アプリケーション・ビルダー」アイコンをクリックします。
- アプリケーションを選択します。
- アプリケーションのホームページで、「共有コンポーネント」をクリックします。
- 「ナビゲーション」で、「リスト」をクリックします。
- 「作成」をクリックします。
- 「最初から」をクリックし、「次へ」をクリックします。
- 「名前およびタイプ」で、次のステップを実行します。
- 名前: 数字または英数字のリスト名を入力します。
- タイプ: 「動的」を選択します。
- ビルド・オプション: このコンポーネントのビルド・オプションを選択します(使用可能な場合)。ビルド・オプションは、アプリケーション内のコンポーネントが有効かどうかを判別する事前定義された設定です。
- 「次」をクリックします。
- 「問合せまたは静的値」で、次のステップを実行します。
- 「リストの作成」で、リスト・リージョンを作成するかどうかを指定します。
関連項目:
親トピック: 動的リストの作成