Sascha Hofrichter 2 Years Ago - Edited Hi David, thanks for this post. But, we have some issues with Liferay 7.4.1-GA2 and the react portlet configurations. Please look at this question: https://liferay.dev/ask/questions/development/liferay-7-4-1-ga2-reactjs-portlet-configuration-could-not-persisted We use the react portlets generated with 'yo' since 1 year. With Liferay 7.3.x the configuration are saved in the DB and they work fine. But in Liferay 7.4.1 it doesn't. The configuration are not stored in DB (postgres 11 with Liferay 7.3.x; postgres 12 with Liferay 7.4.1) We have generated a fresh 'testing-like' portlet by your instructions in this post. With the sample code and the sample configuration. And the configuration could not be stored in DB! We need the possibilty of the portlet configurations. But, now we can't use this types of portlets with Liferay 7.4.1. What we do wrong? BTW: If we try to generate the portlet with blade (version 4.0.9.202107011607), we get the following error: 'create: liferay-js is not among the possible values.' Please sign in to reply. Reply as... Cancel
ahmed joti 2 Years Ago - Edited Thank you Dave for sharing ! Please sign in to reply. Reply as... Cancel
Achraf BEN AISSI 1 Year Ago - Edited Hello David, Thanks for this post. We can also call the Liferay REST API usin Liferay.uil.fetch like this exemple : const getMyUserAcount = async()=>{ try { const result = await Liferay.Util.fetch(`/o/headless-admin-user/v1.0/my-user-account`, {method: 'GET'}); return result.json(); } catch (error) { console.log(error); } } const displayCurentUser = async () => { try { const result = await getMyUserAcount(); const {givenName, familyName} = result; console.log("Hello " + givenName +" "+ familyName); } catch (error) { console.log(error); } } displayCurentUser(); Please sign in to reply. Reply as... Cancel