processingコンポーネントの使用

ヒント: ページ・タイトルで処理アイコンを表示するときは、pageLayout要素のmessageType属性をprocessingに設定します。

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

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

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

  3. プロパティ・インスペクタで、processingコンポーネントに対して次の属性を設定します。

注意: データ・バインディングの使用は、「コンポーネント属性のデータ・バインディング」を参照してください。

索引付けされた子を追加して処理ステータスの説明を表示するには、次のようにします。

  1. 設計構造ウィンドウで、「processing」ノードを右クリックし、「processingの中に挿入」を選択して適切な索引付けされた子、たとえばstyledTextを追加します。
  2. プロパティ・インスペクタで、索引付けされた子コンポーネントの属性、たとえばstyledTextの子のtext属性とstyleClass属性を設定します。

注意: 全ページ・リフレッシュと部分ページ・レンダリング・モードで処理を実装するためのUIX XMLは同じです。サーバーに送信されるパラメータのみが異なります。

例(UIX XML)


...
<processing id="processing-widget"
            percentComplete="75"
            timeInterval="2000">
  <contents>
    <styledText styleClass="OraProcessingStatusVariable"
                text="75%"/>
    <styledText styleClass="OraProcessingStatusFixed"
                text=" of the baking is done." />
  </contents>
</processing>
...
<processing id="processing-widget"
            percentComplete="unknown"
            timeInterval="2000">
  <contents>
    <styledText styleClass="OraProcessingStatusFixed"
                text="The cake is baking." />
  </contents>
</processing>
...
<!-- known percent complete -->
<processing id="processing-widget"
            timeInterval="1000"
            percentComplete="${demo:data().percentComplete.percent}">
  <contents>
    <styledText styleClass="OraProcessingStatusVariable"
                text="${demo:data().percentComplete.percent}"/>
    <styledText styleClass="OraProcessingStatusVariable"
                text="% "/>
    <styledText styleClass="OraProcessingStatusFixed"
                text="of the cake has baked."/>
  </contents>
</processing>
...
<!-- checklist example -->
<processing id="processing-widget"
            timeInterval="1000"
            percentComplete="${demo:data().percentComplete.percent}">
  <contents>
    <tableLayout>
      <!-- show all the steps, but only show the completed checkmark as the process steps complete -->
      <contents childData="${demo:data().allSteps.allStepsData}">
        <rowLayout>
          <contents>
            <cellFormat vAlign="top">
              <contents>
                <!-- rendered is a key into the childData stepsData@demo:allSteps" -->
                <image source="images/processCheck.gif"
                       rendered="${uix.current.rendered}"/>
              </contents>
            </cellFormat>
            <spacer width="5"/>
            <cellFormat vAlign="top">
              <contents>
                <!-- stepsKey is a key into the childData stepsData@demo:allSteps" -->
                <styledText styleClass="OraFieldText"
                            text="${uix.current.processStep}"/>
              </contents>
            </cellFormat>
          </contents>
        </rowLayout>
      </contents>
    </tableLayout>
  </contents>
</processing>
...
<!-- growing list example -->
<processing id="processing-widget"
            timeInterval="1000"
            percentComplete="${demo:data().percentComplete.percent}">
  <contents>
    <tableLayout>
      <!-- show all the completed steps, but databind the rendered piece -->
      <contents childData="${demo:data().allSteps.allStepsData}">
        <rowLayout>
          <contents>
            <cellFormat vAlign="top">
              <contents>
                <styledText styleClass="OraProcessingStatusVariable"
                            rendered="${uix.current.rendered}"
                            text="${uix.current.stepNumber}"/>
                <styledText styleClass="OraProcessingStatusVariable"
                            text=". "
                            rendered="${uix.current.rendered}"/>
                <styledText styleClass="OraProcessingStatusFixed"
                            rendered="${uix.current.rendered}"
                            text="${uix.current.processStep}"/>
              </contents>
            </cellFormat>
          </contents>
        </rowLayout>
      </contents>
    </tableLayout>
  </contents>
</processing>
...    

リフレッシュ・イベントは別途処理する必要があります。

例(UIX XML)


...
<provider>
  <data name="demo:percentComplete">
    <method class="oracle.cabo.servlet.demo.ProcessingTestUtils"
            method="getPercentCompleteData"/>
  </data>
  <data name="demo:allSteps">
    <method class="oracle.cabo.servlet.demo.ProcessingTestUtils"
            method="getAllSteps"/>
  </data>
</provider>
...
...
<handlers>
  <!-- this is the event that the processing element calls -->
  <!-- you must handle this event by figuring out the state of the process -->
  <!-- e.g., is it done -->
  <event name="refresh">
    <method class="oracle.cabo.servlet.demo.ProcessingTestUtils"
            method="getProcessState"/>
  </event>
  <event name="cancel">
    <method class="oracle.cabo.servlet.demo.ProcessingTestUtils"
            method="cancelProcess"/>
  </event>
</handlers>
...    

processingコンポーネントについて

単純なコンポーネントおよびその他のコンポーネントの使用

 

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