3/21/2023 0 Comments Liferay portal bundle directory ceWhen not developing it will be better to run yarn run build and update the URL's with the JS files in your build directory (Options 2 & 3). This is great to point to these files for development because any changes you make to your code will show as soon as you refresh your page in Liferay. NOTE: These JS files are currently being hosted by the React dev server. Display Method C - Remote App's Custom Element Javascript Resources Hosted on Remote Server Save, then this application will be available in your widgets list. Then, navigate to Remote Apps within Liferay's control panel.Ĭreate a new Remote App with the following field details: Once the server is running (se previous step), you should be able to see the application running on it's own server at or similar. Once the server is running, you should be able to see the application running on it's own server at or similar. It should hit Liferay's headless API using Basic Authentication ( over port 8080) So many ways to use Remote Apps!! Yey! Display Method A - Use as separate React App REACT_APP_LIFERAY_USER= Start local server Since this is a "." file it will be hidden by default in most operating systems. Yarn install Configure your development properties from within the. Note: Feel free to use your own labels and values.Ĭlone repo and once ready run the following:.This will add the number of records shown below. Add the following data and press execute.Using the newly created API enpoint for dashboarddataobjects, find the /batch post endpoint Return to the Details tab and publish your new object. Leave the object configuration in Company Scope (default). A more restricted policy is recommended for production use. Default values need to be changed to allow for Cross-Origin Resource Sharing for this the new headless api endpointresource.Īdd or the existing entry by including the following url pattern. In System Settings > Security Tools > Portal Cross-Origin Resource Sharing (CORS) create a CORS policy. Change the data using the UI or headless API endpoints to get an instant update!Īdd Cross-Origin Resource Sharing (CORS) policy This resource can be used as a 7.4 Remote App (iFrame or Custom Element) or a separate React App hosted elsewhere.Ĭhart is set to refresh it's data via API on a 5-second interval. React Chart using data from Liferay Objects (7.4)Įxample of populating data into a React Chart ( FusionCharts) from a API that was created through Liferay Objects (7.4).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |