Java サーバー・ページを使用した、Web UI フレームワークの Extensibility Workbench および Designer Workbench によって作成された拡張のデプロイ

Web UI フレームワークの Extensibility Workbench および Designer Workbench の「Java™ Server」ページで作成された拡張機能をデプロイできます。

このタスクについて

Java Server Page (JSP) を使用して、(Extensibility Workbench で変更された) 差分拡張機能または (Designer Workbench を使用して作成された) オーバーライド拡張機能をデプロイするには、以下を実行します。

注: UNIX/Linux ファイル・パスは、以下の手順で使用されます。

手順

  1. アプリケーションをインストールし、その WAR ファイルを作成します。
    1. サーバーに WAR ファイルを、展開されたフォーマットでデプロイします。
    2. デプロイメントが終了したら、アプリケーション・サーバーを開始します。
  2. Extensibility Workbench を使用して行った変更、または Designer Workbench を使用して作成された新規画面に、関連するすべての JSON ファイルおよび JavaScript ファイルが生成されて保存されていることを確認します。
  3. <INSTALL_DIR> /extensions フォルダー内に、以下のサブディレクトリーを作成します。

    <アプリケーション・パッケージ名> /webpages

  4. webpages サブディレクトリー内で、展開する画面のディレクトリー構造を (デプロイメントに対して相対的に) 複製し、その中にワークベンチによって生成されたすべてのスクリプト・ファイルをコピーします。

    例えば、フライトルート管理画面(ファイルパス <アプリケーションパッケージ名>/flightRoute を使用)を拡張する場合、すべての拡張スクリプトファイルを <INSTALL_DIR>/extensions/ name>/flightRouteにコピーします。

  5. 基本 JSP ファイルと同じ名前を持つ新規 JSP ファイルを作成し、それらの新しく生成されたファイルを同じフォルダー内で起動します。
    オリジナル JSP のサンプル・コードは、以下のとおりです。
    <%@ taglib uri="/WEB-INF/scui.tld" prefix="scuitag" %>
    <jsp:include page="/stk/include.jsp">
        <jsp:param name="title" value="manage flight route" />
    </jsp:include>
    <script>
        Ext.ns("sc.stk");
        sc.stk.fn = function() {
            var fr = new sc.stk.flightRoute();
            sc.plat.ScreenTitle.setText(fr.Header, null, "sc-panel-belowmenu-text");
            sc.plat.ScreenTitle.setText(fr.Header, null, "sc-panel-belowmenu-desc");
            fr.render("mainBodyPanel");
        }
    <scuitag:includeJS
    name="['/stk/flightRoute/flightRouteList_config.js','/stk/flightRoute/flightRouteList.js',
    '/stk/flightRoute/flightRouteList_bundle.js']"
    callBack="sc.stk.fn"/>
    </script>
    <jsp:include page="/stk/footer.jsp">
    
    新規 JSP (差分拡張性) のサンプル・コードは、以下のとおりです。
    <%@ taglib uri="/WEB-INF/scui.tld" prefix="scuitag" %>
    <jsp:include page="/stk/include.jsp">
        <jsp:param name="title" value="manage flight route" />
    </jsp:include>
    <script>
        Ext.ns("sc.stk");
        sc.stk.fn = function() {
            var fr = new sc.stk.flightRoute();
            sc.plat.ScreenTitle.setText(fr.Header, null, "sc-panel-belowmenu-text");
            sc.plat.ScreenTitle.setDescription(fr.Header, null, "sc-panel-belowmenu-desc");
            fr.render("mainBodyPanel");
        }
    <scuitag:includeJS
    name="['/stk/flightRoute/flightRouteList_config.js','/stk/flightRoute/flightRouteList.js',
    '/stk/flightRoute/flightRouteList_bundle.js','/stk/flightRoute/test_overlays.js'
    ,'/stk/flightRoute/test.js']"
    callBack="sc.stk.fn"/>
    //The new JSP also includes the newly generated files: test_overlays.js and test.js
    </script>
    <jsp:include page="/stk/footer.jsp">
    
    新規 JSP (オーバーライド拡張性) のサンプル・コードは、以下のとおりです。
    <%@ taglib uri="/WEB-INF/scui.tld" prefix="scuitag" %>
    <jsp:include page="/stk/include.jsp">
        <jsp:param name="title" value="Custom Screen" />
    </jsp:include>
    <script>
        Ext.ns("sc.stk");
        sc.stk.fn = function() {
            var fr = new sc.stk.flightRoute();
    /*
    sc.extn.CustomScreen is the className for the new screen.  It is available
    as a property for a screen in the designer and defaulted to
    sc.module.ClassName.  The user can change it.
    */
            sc.plat.ScreenTitle.setText(fr.Header, null, "sc-panel-belowmenu-text");
    /*
    Here, the setText(arg1, arg2, arg3) method has been used to set arg1 as
    title for a page as arg3="sc-panel-belowmenu-text".  Here, a bundle entry in
    the file: newScreen_bundle.js corresponding to Header would be picked up.
    */
            sc.plat.ScreenTitle.setDescription(" ", null, "sc-panel-belowmenu-desc");
            fr.render("mainBodyPanel");
        };
    <scuitag:includeJS
    name="['/extn/stk/flightRoute/newScreen_config.js', 
    '/extn/stk/flightRoute/newScreen.js', '/stk/flightRoute/newScreen_bundle.js']"
    callBack="sc.stk.fn"/>
    //This JSP includes the files generated through the designer:
    newScreen_config.js, newScreen.js and the localization file:
    newScreen_bundle.js
    </script>
    <jsp:include page="/stk/footer.jsp">
    
  6. WAR ファイルを再作成します。

    <INSTALL_DIR> /extensions/ < アプリケーション・パッケージ名> /webpages ディレクトリーの内容は、以下のディレクトリーにコピーされます。

    <INSTALL_DIR> /external_deployments/< アプリケーション・パッケージ名>/extn

    このディレクトリー構造は、WAR ファイルが作成され、同じ <INSTALL_DIR> /external_deployment ディレクトリーに展開された場合にのみ存在します。

    基本 JSP と同じ名前を持ち、同じ相対ディレクトリー構造にあるこのディレクトリー内のすべての JSP ファイルは、出荷時の状態の JSP ファイルをオーバーライドします。

  7. アプリケーションを再起動して、拡張された変更を表示します。