Legacy Knowledge Base
Published Jul. 2, 2025

Can I access the configuration variable in a JS widget created with liferay-js:adapt?

Written By

Alfonso Crisci

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

Environment

Resolution

  • Using the configuration variable in a re-adapted JS app is not supported and won't be in the future. This is because the portlet bootstrapping process depends very much on the underlying framework and the JS Toolkit doesn't have control over it. As a result, it is not possible for the tool to guarantee support for reliably accessing the configuration.

  • Furthermore, liferay-js:adapt is intended as a way to run JS code that is not Liferay specific. When Liferay features are needed, it is recommended to switch to non-adapted projects (i.e., developing the project from scratch with yo liferay-js) instead of using the frameworks' development tools. These may trigger inconsistencies, given that they are designed with a SPA in mind rather than a Liferay portlet.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base