Skip to main content

Oracle APEX - Switching theme is not easy

I have two APEX applications (102 and 105) that use the same layout and design. Currently each application has its own theme and templates, which needed to be updated in parallel. Today I needed to create a third application with the same design. Therefore I studied how to make my theme and templates reusable.

At first, it struck me that there is option to create Workspace Theme. So I created one, based on my application 102 theme. Intentionally set the Subscribe Theme to NO because I wanted to switch both of my applications to use the workspace theme. After that I discovered that it is impossible to edit Workspace theme templates directly (need to create application using the workspace theme to edit templates).

Secondly I decided to create Master Theme Application that holds the shared theme templates. Copied theme from existing application 102. And created Workspace Theme based on Master Theme application theme with Subscribe Theme set to YES.


It all went smoothly until I switched the theme in my old application 102 to use the new Workspace Theme. After that I discovered that application layout and design was completely out of order. The reason was that most of Region/Item layout and appearance properties were reset! It includes Item properties like "Start New Row", Region properties like "Template Options".


As my application has lot of complex regions, I have no time to check and change all the properties again. The easier way was to choose the 102 application theme as the source of Workspace Theme. And leave the 105 currently with its on template. And for the third (new) application use the Workspace template subscribed from apllication 102 template.

Lessons learned:
  • Theme switching resets Region and Item layout/appearance properties - is it APEX bug and could it be fixed?
  • If you want to create several application with the same design, you should create or choose "master" template application at the very beginning. Because it is very hard to integrate them later. Afterwards, themes in all other applications can subscribe  to the "master" application theme. 
Update: Seems that there existed "Reset Grid" and "Match Template classes" options in Switch Theme dialog. But in my installation (apex 19.1) these do not exist.



Comments

Popular posts from this blog

Diacritical letters (ÖÄÜÕ) in HTTPS certificate name and oracle wallet (orapki)

I had to use oracle UTL_HTTP to access HTTPS site. The site uses diacritical letters (öäüõ) in certificate organization name. This site was  https://ariregister.rik.ee/  where subject was CN = *.rik.ee O = Registrite ja infosüsteemide Keskus L = Tallinn C = EE Typically I have added all certificates in path as trusted root certs into oracle wallet. In this case, there were three certificates on path: So I exported those as: *.rik.ee to arireg1.cer DigiCert SHA2 High Assurance Server CA to arireg2.cer DigiCert High Assurance EV Root CA to arireg3.cer And imported them to oracle wallet: orapki wallet add -wallet /u01/app/oracle/admin/MYSID/xdb_wallet/ -trusted_cert -cert "/tmp/arireg1.cer" -pwd XXXXXX orapki wallet add -wallet /u01/app/oracle/admin/MYSID/xdb_wallet/ -trusted_cert -cert "/tmp/arireg2.cer" -pwd XXXXXX orapki wallet add -wallet /u01/app/oracle/admin/MYSID/xdb_wallet/ -trusted_cert -cert "/tmp/arireg3.cer" -pwd XXXXXX Usi...