SDN Controller Programming Guide

60
Directory: /myapp/src/main/resources
Java package: com.acme.myapp.ui
File: js.html
Purpose: Javascript content to inject into the index HTML page generated by SDN (at the
JAVASCRIPT-INCLUDES marker).
UI Extension Javascript code injection:
<script src="/acme/ui/myapp/app/my-nav.js"></script>
<script src="/acme/ui/myapp/app/my-view.js"></script>
Directory: /myapp/src/main/resources
Java package: com.acme.myapp.ui
File: css.html
Purpose: CSS content to inject into the index HTML page generated by SDN (at the CSS-
INCLUDES marker).
UI Extension Javascript CSS injection:
<link href="/acmesdn/ui/ctl/app/ctl-style.css" rel="stylesheet">
Directory: /myapp/src/main/resources
Java package: com.acme.myapp.ui.lion
File: nav-lion.properties
Purpose: Java properties file containing the navigation item localization strings:
UI Extension navigation localization:
n-my-view = My Application
Directory: /myapp/src/main/resources
Java package: com.acme.myapp.ui.lion
File: my-view.properties
Purpose: Java properties file containing the view’s localization strings.
UI Extension view localization:
Title = My Viewer
icon = grid
someText = This is some localized text.
Directory: /myapp/src/main/webapp
File: my-nav.js
Purpose: specifies where the view should be located in the SDN navigation model, the following is
specifying that the navigation item n-my-view should be added after the n-audits navigation item in
the SDN navigation tree, the navigation item selects view my-view.
UI Extension JavaScript navigation implementation:
(function (api) {
'use strict';