listOfValuesの挿入

listOfValuesコンポーネントを挿入するには、次のようにします。

  1. 目的のファイルの設計構造ウィンドウで、listOfValuesコンポーネントを挿入するノードを探します。
  2. コンポーネント・パレットのドロップダウン・リストから「Layout Components」を選択し、listOfValuesコンポーネントを選択した親ノードにドラッグ・アンド・ドロップします。

    「listOfValues」ノードが、展開された親ノードに挿入され、強調表示されます。

  3. プロパティ・インスペクタで、listOfValuesコンポーネントに対して次の属性を設定します。
  4. 注意: データ・バインディングを使用するには、「コンポーネント属性のデータ・バインディング」を参照してください。

  5. 子コンポーネントをadvancedChoicesに追加するには、次のようにします。
    1. 設計構造ウィンドウで、「listOfValues」ノードを展開して、名前付きの子「advancedChoices」を探し、次に「advancedChoices」を右クリックして目的のコンポーネント、たとえばlabeledFieldLayoutを挿入します。
    2. プロパティ・インスペクタで、挿入した子コンポーネントの属性を設定します。
  6. filterChoices子コンポーネントを追加するには、次のようにします。
    1. 設計構造ウィンドウで、「listOfValues」ノードを展開して、名前付きの子「filterChoice」を探し、次に「filterChoice」を右クリックして目的のコンポーネント、たとえばchoiceを挿入します。optionコンポーネントをchoice要素に追加する説明は、「optionの挿入」を参照してください。
    2. プロパティ・インスペクタで、挿入した子コンポーネントの属性を設定します。
  7. 子コンポーネントをheaderInstructionsに追加するには、次のようにします。
    1. 設計構造ウィンドウで、「listOfValues」ノードを展開して、名前付きの子「headerInstructions」を探し、次に「headerInstructions」を右クリックして目的のコンポーネント、たとえばstyledTextを挿入します。
    2. プロパティ・インスペクタで、挿入した子コンポーネントの属性を設定します。
  8. 子コンポーネントをsearchInstructionsに追加するには、次のようにします。
    1. 設計構造ウィンドウで、「listOfValues」ノードを展開して、名前付きの子「searchInstructions」を探し、次に「searchInstructions」を右クリックして目的のコンポーネント、たとえばstyledTextを挿入します。
    2. プロパティ・インスペクタで、挿入した子コンポーネントの属性を設定します。
  9. tableコンポーネントをlistOfValuesコンポーネントに追加するには、次のようにします。
    1. 設計構造ウィンドウで、「listOfValues」ノードを右クリックし、「listOfValuesの中に挿入」->「table」を選択します。
    2. 詳細は、「表の作成」を参照してください。

例(UIX XML)

これは「messageLovInputの挿入」lovInputTest.uixファイルからコールされるlistOfValues_Dialog.uixファイルです。

Example: Copyright (c) Oracle Corporation 2002-2003. All Rights Reserved.

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) Oracle Corporation 2002-2003. All Rights Reserved. -->
<!-- @version $Name: $ ($Revision: 1.4 $) $Date: 2003/10/01 01:43:17 $ -->
<!-- This file implements the back end support for the components guide -->
<!-- LOV example demos. Some of the examples have multiple lovInput -->
<!-- fields but, for simplicity, this file only implements a single -->
<!-- listOfValues to support all of them. -->
<page xmlns="http://xmlns.oracle.com/uix/controller"
      xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
      xmlns:ui="http://xmlns.oracle.com/uix/ui"
      expressionLanguage="el">
  <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
      <contents>
        <flowLayout>
          <contents>
            <listOfValues title="${ui:defaulting(uix.data.fieldData['current'].title,
                                'Available peak values')}"
                          id="lovHandler"
                          searchText="${uix.data.fieldData['current'].fieldText}"
                          searchAreaMode="${uix.data.generalParams.currentMode}">
              <headerInstructions>
                <styledText text="Choose a peak"
                            styleClass="OraInstructionText"/>
              </headerInstructions>
              <!-- Helpful text for the search area -->
              <searchInstructions>
                <styledText text="${uix.data.generalParams.instructions}"
                            styleClass="OraInstructionText"/>
              </searchInstructions>
              <!-- This choice just pulls out the column headers  -->
              <filterChoice>
                <choice name="categoryChoice"
                        multiple="false"
                        selectedValue="${uix.data.generalParams.categoryChoice}">
                  <contents childData="${uix.data.categoryData}">
                    <option text="${uix.current}"/>
                  </contents>
                </choice>
              </filterChoice>
              <advancedChoices>
                <labeledFieldLayout width="90%"
                                    labelWidth="18%"
                                    columns="2">
                  <contents childData="${uix.data.generalParams.advSearchFields}">
                    <messageTextInput prompt="${uix.current.prompt}"
                                      columns="15"
                                      name="${uix.current.name}"
                                      text="${uix.data.fieldData['current'][uix.current.dataName]}"/>
                  </contents>
                </labeledFieldLayout>
              </advancedChoices>
              <contents>
                <flowLayout>
                  <contents>
                    <!-- Here's the table definition -->
                    <!-- This must be a form submitted proxied table -->
                    <table name="lovTbl"
                           id="lovTbl"
                           width="80%"
                           minValue="1"
                           formSubmitted="true"
                           proxied="true"
                           alternateText="${uix.data.tableParams.alternateText}"
                           blockSize="${uix.data.tableParams.size}"
                           maxValue="${uix.data.tableParams.max}"
                           tableData="${uix.data.tableData}"
                           value="${uix.data.tableParams.start}"
                           columnHeaderData="${uix.data.categoryData}">
                      <tableFormat tableBanding="rowBanding"/>
                      <columnHeaderStamp>
                        <text text="${uix.current}"/>
                      </columnHeaderStamp>
                      <tableSelection>
                        <multipleSelection text="select an item"
                                           selected="${uix.current.selected}"/>
                      </tableSelection>
                      <contents>
                        <!-- Populate with some sample peak data -->
                        <text text="${uix.current.peak}"/>
                        <text text="${uix.current.altitude}"/>
                        <text text="${uix.current.location}"/>
                        <text text="${uix.current.ascent}"/>
                        <text text="${uix.current.climbers}"/>
                        <!-- This element supplies a rowid to show how extra   -->
                        <!-- data could be put on the form. This value will be -->
                        <!-- submitted with every operation on this table.     -->
                        <formValue name="rowid" value="${uix.current.rowid}"/>
                      </contents>
                    </table>
                  </contents>
                </flowLayout>
              </contents>
            </listOfValues>
          </contents>
        </flowLayout>
      </contents>
      <provider>
        <data name="categoryData">
          <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
                  method="getCategoryNames"/>
        </data>
        <data name="tableData">
          <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
                  method="getDataSet"/>
        </data>
        <data name="generalParams">
          <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
                  method="getGeneralParams"/>
        </data>
        <data name="fieldData">
          <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
                  method="getFieldSet"/>
        </data>
        <data name="tableParams">
          <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
                  method="getTableParameters"/>
        </data>
      </provider>
    </dataScope>
  </content>
  <handlers>
    <event name="lovFilter">
      <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
              method="handleLovFilterEvent" />
    </event>
    <event name="lovSelect">
      <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
              method="handleLovSelectEvent" />
    </event>
    <event name="goto">
      <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
              method="handleGotoEvent" />
    </event>
    <event name="lovSearchMode">
      <method class="oracle.cabo.servlet.demo.ListOfValuesDemoData"
              method="handleLovSearchModeEvent" />
    </event>
  </handlers>
</page>    

listOfValuesについて
lovOpenWindowActionクライアント・アクションについて
messageLovInputについて

messageLovInputの挿入
レイアウト・コンポーネントの使用

 

Copyright © 1997, 2004, Oracle. All rights reserved.