Java環境下SOE—Rest開發之4(ArcGIS Server Manager屬性頁面設計需注意的幾個 問題)

來源:互聯網
上載者:User

在ArcGIS Server Manger中SOE擴充的屬性也許並不都是文本,有時我們可能需要一些選擇框、下拉框等,這時便需要對屬性頁面進行自訂設計,對於SOE在ArcGIS Server Manager中屬性頁面設計協助手冊裡已經非常全了,這裡只介紹幾個需要注意的問題。屬性頁面設計主要由一個由Dojo JavaScript設計的Widgets和一個屬性網頁整合完成。

1) Dojo Widget必須命名為Config.js,使用其它名稱並會造成在自訂屬性頁面的無法擷取。

在此檔案內的所有widgets必須“arcgis.soe.<fully qualified SOE name>”作為它的命名空間。

如下所示,為正確的格式。

dojo.provide("arcgis.soe.arcgissamples.soe.ServerObjectExt.Config");

 

dojo.require("dijit.form.Select");

dojo.require("dijit._Templated");

 

dojo.require("esri.discovery.dijit.services._CustomSoeConfigurationPane");

 

dojo.declare("arcgis.soe.arcgissamples.soe.ServerObjectExt.Config",[ esri.discovery.dijit.services._CustomSoeConfigurationPane, dijit._Templated], {

……

2) Dojo指令碼必須進行指令碼格式驗證,錯誤的格式將導致部署異常。如下

……

 widgetsInTemplate: true,

 typeName: ServerObjectExt,

 _capabilities: null,

……

tyName變數值由於沒有加上引號將會引發SOE異常。

3)布局 HTML 檔案,在這裡定義Dojo Widget對應的控制布局,命名保持一致。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.