cancel
Showing results for 
Search instead for 
Did you mean: 

Using Custom Theme in UI5 application

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello All, 

I found a solution to my URL  problem.   I had  to  ensure  that  my SRC  in the bootstrap  was correct for  my Gateway system.   

src="/sap/public/bc/ui5_ui5/1/resources/sap-ui-cachebuster/sap-ui-core.js"


I originally had

src="./resources/sap-ui-core.js"   which  apparently was  not  pulling in correct version.


apparently somewhere in the bowels  of sap-ui-core.js   it  determines  the url.


thanks  for everyones  responses.


Ernie




former_member182874
Active Contributor
0 Kudos

Hi Ernesto,

Make sure you are at latest UI library version. Also you might want to move to 1.26.13, as this is the stable version in 1.26*

Or you can check moving to SP12 of SAPUI

.

Regards,
Tejas

Former Member
0 Kudos

Thank you.

I have talked to my Basis Admin about upgrading.

ernie