Custom Widget Deployment with Enterprise

1137
4
12-01-2020 02:32 AM
Labels (1)
TakahiroKAMIYA
Esri Contributor

①Creating Custom Widgets 

nls/ja/strings.js

define({
    _widgetLabel: "シェープファイルの追加 (3D)"
});

②Adding items from ArcGIS Enterprise
Adding custom widgets in the application extension (AppBuilder) in ArcGIS Enterprise 10.8.1

The title: シェープファイルの追加 (3D)

TakahiroKAMIYA_0-1606818446479.png

③Creating a WebAppBuilder from ArcGIS Enterprise.
Add a custom widget added in ②

An error occurs that the app will not start.

TakahiroKAMIYA_1-1606818509141.png

Q: Shouldn't the names ① and ② be the same?

Is there a limitation in the item name or a known bug that prevents the application from launching normally when the item name registered to Portal and the _widgetLabel of nls/en/string.js are the same?

0 Kudos
4 Replies
VictorTey
Esri Contributor

Hi,  there isn't an issue. I do it all the time. The title of the item will take precedence.  However you are getting a 404 and it is erroring out on string and not string.js. if you take the url that 404 and paste it in a new tab, i can guarantee it is not resolving.  I am guessing somewhere in your code or a dependency library is calling out to string something like

"dojo/i18n!../nls/strings",
 
 
0 Kudos
TakahiroKAMIYA
Esri Contributor

スクリーンショット 2020-12-04 15.10.53.png

Thank you for the information.

It is an error, but you are experiencing the above error.

0 Kudos
VictorTey
Esri Contributor

Hi did you take the code from the add data widget?  cause if you did I don't think it is going to work. You will need to use wab developer. The problem is the path resolution for the string.js. Maybe you can 

try replacing

"dojo/i18n!../nls/strings", to the full path of your string.js. e.g https://xxx.xxx.xxx/strings.js

0 Kudos
TakahiroKAMIYA
Esri Contributor

TakahiroKAMIYA_0-1607314617956.png

Add an item title with a different name シェープの追加

TakahiroKAMIYA_1-1607314914882.png

In that case the app will launch normally.

Would it be a matter of custom widget settings, etc.?

0 Kudos