Skip to Content
0
Former Member
Jun 15, 2015 at 02:21 PM

Using Custom Theme in UI5 application

214 Views

Hello All,

I have created a custom them using Theme Designer in a local NW gateway system.

SAP_ABAP 740 SP8

SAP_UI 740 SP11

UI Theme Designer:

Theme Designer Version : 1.8.2

Theme Engine Version : 1.8.2

SAPUI5 Version (Build) : 1.26.9

Unified Rendering SAP Themes:

Changelist : 223263

Build time : Fri Oct 31 19:02:24 2014

SAPUI5:

Base Dir : /sap/public/bc/ui5/libraries/ver/1.26

Build Timestamp: : 201411171508

Version: : 1.26.1

When I access the custom theme using the Query String parameter ?SAP-THEME=customTheme@https:xxx:xxx//sap/public/bc/themes/~client-200

I find my custom theme as such:

sap-ui-core.js:80 2015-06-12 14:41:06 registerResourcePath ('sap/ui/core/themes/ZOpenSpace', '/sap/public/bc/themes/~client-200/UI5/sap/ui/core/themes/ZOpenSpace/') - sap.ui.ModuleSystem

2015-06-12 14:41:06.947 sap-ui-core.js:80 2015-06-12 14:41:06 registerResourcePath ('sap/m/themes/ZOpenSpace', '/sap/public/bc/themes/~client-200/UI5/sap/m/themes/ZOpenSpace/') - sap.ui.ModuleSystem

2015-06-12 14:41:07.176 sap-ui-core.js:80 2015-06-12 14:41:07 registerResourcePath ('sap/ui/core/themes/ZOpenSpace', '/sap/public/bc/themes/~client-200/UI5/sap/ui/core/themes/ZOpenSpace/') - sap.ui.ModuleSystem

However if I specify the theme in the script:

data-sap-ui-theme="ZOpenSpace"

data-sap-ui-theme-roots='{"ZOpenSpace" : "https://xxx:xxxxx/sap/public/bc/themes/~client-200"}'

I get the following 404 ( notice the /UI5/ is missing from the path)

sap-ui-core.js:80 2015-06-12 14:46:30 registerResourcePath ('sap/ui/core/themes/ZOpenSpace', 'https://xxx:xxxx/sap/public/bc/themes/~client-200/sap/ui/core/themes/ZOpenSpace/') - sap.ui.ModuleSystem

2015-06-12 14:46:30.761 sap-ui-core.js:80 2015-06-12 14:46:30 registerResourcePath ('sap/m/themes/ZOpenSpace', 'https:xxx:xxxxx/sap/public/bc/themes/~client-200/sap/m/themes/ZOpenSpace/') - sap.ui.ModuleSystem

How is this derived. I do not want to specify the theme on the query string.

thanks for any help you can give.