We have new requirement, where UI theme should be different from Production vs Non-Production environment. from the Guidewire document, we can create a Custom theme but is there option to set the theme based on the environment?
1
There are 1 best solutions below
Related Questions in GUIDEWIRE
- com.fasterxml.jackson.databind.exc.InvalidTypeIdException
- Guidewire Themes based on Environment
- Cloud API: ConcurrentDataChangeException is thrown when using the Composite API
- Request for assistance with Guidewire, Claims Center, TYPE column and PAYMENT vs PAYEMENT
- How to use boolean value from other entity in activitydesktopview entity?
- Is there way to sync only one coverage in guidewire?
- Converting Claim Graph to POJO classes for IG app
- Why is my filter that removes system users removing system users and saving to database?
- System table in Guidewire and retiring past entries
- Any reason why prior term changes are picking territory code from address that was updated in future terms?
- Components from this namespace are not referenceable from schema document - LexisNexis service
- In Guidewire testing framework, as part of ignite setup, "gwb compile" command not recognizing
- How to unvoid payment in ClaimCenter
- How to add an external link to the Desktop menu
- Guidewire APD giving Regex pattern error while trying to add schedule items under schedule coverage
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This answer is in the context of Insurance Suite apps and not digital portals since that is not mentioned in the question. I think it is possible to enforce themes by the environment but not possible to do it programmatically (in Gosu). In case you were expecting to check
ServerUtil.Envand set a theme of your choice.The default application theme is defined in
configuration/webresources/Client_Properties.jsonand you can set it as below:Change the above web resources file to mark your theme as the default. You can limit the available themes by excluding them from the list below.
So as long as your
deploy/resources/Client_Properties.jsonreflects the correct theme name, it will get set. Note that this file is generated after runninggwb webResourcesor through the studio by clicking the Tools -> Web Resources button. Writing to this file dynamically may not be easy but your CI / CD process may be able to take care of this. Just make sure to write the appropriate theme name and regenerate web resources as a pre-build step before building the war and deploying it. An env build variable can be used to set the theme of choice depending on the env being deployed.Another approach would be to fiddle with certain typescript files that set the theme at runtime. While it is possible and an easier approach, Guidewire may not like you editing the platform level JS files as they are likely to be overwritten during an upgrade. I have figured that the right theme is shown as long as the top level HTML tag has the theme in its id and the correct stylesheet is being referenced.
So if you can figure out a way to set the above attributes dynamically using custom JavaScript in
customer.jsthat may count as a solution but its usually not recommended.These solutions would however not restrict a user from changing their theme as themes are user-specific and probably stored on the browser's local storage. However, you can always limit or restrict the available themes on a server to enforce the default one. Another approach that is preferred by customers to differentiate one env from another is to use large labels on the top of the webpage that say "QA" or "DEV".