ルール・ディクショナリ・エディタ・コンポーネントの.jspxファイルの作成方法

次のタスクは、ルール・ディクショナリ・エディタ・コンポーネント・タグを挿入する.jspxファイルの作成です。

ルール・ディクショナリ・エディタ・コンポーネント・タグの.jspxファイルを作成するには:

  1. Oracle JDeveloperを開きます。
  2. 「ファイル」メニューから、「新規」を選択し、次に「JSF/Facelets」を選択します。
  3. 「JSFページ」を選択して、「OK」をクリックします。
  4. ドキュメント・タイプに「JSP XML」を選択します。
  5. ファイル名にruleDictEditor.jspxを入力します。「OK」をクリックします。
  6. JDeveloperの「コンポーネント」ウィンドウに「RuleDictionaryDC」が表示されます(図26-30を参照)。

    図26-30 「コンポーネント」ウィンドウ

    図26-30の説明が続きます
    「図26-30 「コンポーネント」ウィンドウ」の説明
  7. 「RuleDictionaryDC」を選択すると、「RuleDictionaryDC」タグが表示されるはずです。「RuleDictionaryDC」タグをJSPXファイルにドラッグ・アンド・ドロップします(図26-31)。

    図26-31 ルール・ディクショナリのDCタグ

    図26-31の説明が続きます
    「図26-31 ルール・ディクショナリのDCタグ」の説明

    次のようにして、「RuleDictionaryDC」タグを手動でjspxファイルに追加することもできます。

    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:rddc="http://xmlns.oracle.com/bpel/rules/dictionaryEditor">
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
        <f:view>
            <af:document title="ruleDictEditor" id="d1">
                <af:form id="f1">
                    <af:panelGridLayout id="pgl1" inlineStyle="margin:15px;" styleClass="AFStretchWidth"
                                        partialTriggers="cb2 cb3 cb6">
                        <af:gridRow id="dc_gr1" marginTop="5px" marginBottom="5px">
                            <af:gridCell marginStart="5px" marginEnd="5px" width="100%" halign="stretch" id="gc1">
                                <af:panelGroupLayout id="pgl3" layout="horizontal">
                                    <af:button text="Save Dictionary" id="cb2" action="#{someBean.saveDictionary}"/>
                                    <af:spacer width="10" height="10" id="s1"/>
                                    <af:button text="Validate" id="cb3" action="#{someBean.validate}"/>
                                    <af:spacer width="10" height="10" id="s3"/>
                                    <af:button text="Toggle Mode" id="cb6" action="#{someBean.toggleMode}"/>
                                </af:panelGroupLayout>
                            </af:gridCell>
                        </af:gridRow>
                        <af:gridRow height="100%" id="gr2">
                            <af:gridCell width="100%" halign="stretch" valign="stretch" id="gc2">
                                <!-- Content -->
                                <rddc:ruleDictionaryDC ruleDictModel="#{someBean.ruleDictModel}" id="rddc1"
                                                       rulesEditorPrefs="#{someBean.rulesEditorPrefs}"
                                                       viewOnly="#{someBean.viewOnly}" disableVerbalRules="false"/>
                            </af:gridCell>
                        </af:gridRow>
                    </af:panelGridLayout>
                </af:form>
            </af:document>
        </f:view>
    </jsp:root>