RE: Liferay embed Portlet with dynamic QueryString pass value from VueJS

thumbnail
Man Math, modified 6 Years ago. New Member Post: 1 Join Date: 9/25/19 Recent Posts
Hi All,Currently, I got struggle on how to embed Portlet with passing dynamic query string value from VueJS. [Liferay 7.0]
<liferay-portlet:runtime queryString="userId=[dynamic user id here]" portletName="MyUserProfilePortlet" />
liferay-portlet:runtime contains internal scripts, in which we cannot put this tag into Vue template. This is the main root cause that I do not know how to pass dynamic userId when click on any user list to display the detail profile. (see screenshot)

Why do I need to choose embed portlet? I have implemented already the user profile detail in My User Profile Portlet. And now I have another new portlet that just want to quick show user profile detail that have layout as the previous one.Please give me some ideas or suggest new way to load data from other portlet with dynamic query strings.

Thanks,Man
thumbnail
Jeffrey Handa, modified 6 Years ago. Liferay Master Posts: 541 Join Date: 12/1/08 Recent Posts
Hi Man, As this question doesn't seem to be Commerce specific, you might get a quicker response if you ask in the Liferay Portal Development category.  https://liferay.dev/forums/-/message_boards/category/239390
thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
You shouldn't need to "dynamically pass current user id".  User id is known both on the backend as well as in the browser. Just use the value that is available.