Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Use of Private Messenger in JSF portlet
Hi all,
i have a question having relevance to private messenger app feature from liferay in combination with customJSF Portlet. Are there any options to call a popup on button click from JSF Portlet and see the same popup window which appears by standard liferay contacts portlet, when you click on "message" button in contact portlet, please see attached file? Using Liferay 7, JSF Portlet (com.liferay.faces -5.0.3, primefaces). I have commandButton inside my .xhtml file and i want to call popup window which triggers that popup from new_message. jsp of private messenger app. Here is the link to the standard contact portlet lines in jsp file where it's used https://github.com/liferay/com-liferay-contacts/blob/master/contacts-web/src/main/resources/META-INF/resources/user/user_toolbar.jsp Lines 178-211. Has anyone had smth similar to do in their experience?
Appreciate any help.
Thank you,
Zarina
i have a question having relevance to private messenger app feature from liferay in combination with customJSF Portlet. Are there any options to call a popup on button click from JSF Portlet and see the same popup window which appears by standard liferay contacts portlet, when you click on "message" button in contact portlet, please see attached file? Using Liferay 7, JSF Portlet (com.liferay.faces -5.0.3, primefaces). I have commandButton inside my .xhtml file and i want to call popup window which triggers that popup from new_message. jsp of private messenger app. Here is the link to the standard contact portlet lines in jsp file where it's used https://github.com/liferay/com-liferay-contacts/blob/master/contacts-web/src/main/resources/META-INF/resources/user/user_toolbar.jsp Lines 178-211. Has anyone had smth similar to do in their experience?
Appreciate any help.
Thank you,
Zarina
Hi Zarina,
I recommend that you take a look at the portal:runtime JSF component provided by the Liferay Faces Portal dependency. It provides the ability to embed a non-JSF portlet within a JSF portlet view.
Kind Regards,
Neil
I recommend that you take a look at the portal:runtime JSF component provided by the Liferay Faces Portal dependency. It provides the ability to embed a non-JSF portlet within a JSF portlet view.
Kind Regards,
Neil
Hi Neil,
thank you for your time and suggestion, is it possible to use it only for that popup window, because i don't need to embed the whole private messenger app in jsf?
Thank you,
Zarina
thank you for your time and suggestion, is it possible to use it only for that popup window, because i don't need to embed the whole private messenger app in jsf?
Thank you,
Zarina
Yes, you can use it only for the popup window. Do you want it to be a popup within the current page (for example, like a PrimeFaces p:dialog) or a detatched window / browser tab? If using something like p:dialog then you can simply use the portal:runtime component tag I mentioned earlier. If using a detached window / browser tab then the URL of the window must be a portlet RenderURL that targets the standard contact portlet. You can use the PortletURLFactoryUtil API to create a RenderURL for any portlet deployed within the system.
I am using just simple modal p:dialog, no need for detached window. I just can't understand how do i call exactly that jsp from contact portlet which is shown after button click on msg? Because if i embedd the whole portlet it will show the whole contact portlet? I've tried to test it and called on button click a p:dialog with following call to privat messaging app as test
..here call on button click
...<p:dialog ..><h:form>
<portal:runtimeportletName="...social_privatemessaging_web_portlet_PrivateMessagingPortlet" />
</h:form>
</p:dialog>
but its not showing any embedded portlet, not what i need, but wanted to check as a test.
..here call on button click
...<p:dialog ..><h:form>
<portal:runtimeportletName="...social_privatemessaging_web_portlet_PrivateMessagingPortlet" />
</h:form>
</p:dialog>
but its not showing any embedded portlet, not what i need, but wanted to check as a test.
Hi Zarina, are you including the com.liferay.faces.portal.jar dependency in your WAR?
Hi Neil, yes I do have the dependencies included.
Regards,Zarina
Regards,Zarina
OK, please paste the exact usage of portal:runtime -- the example you gave had a "..."
<portal:runtime portletName="...social_privatemessaging_web_portlet_PrivateMessagingPortlet" />
Hi Neil, here is the usage:
<p:dialog id="test" widgetVar="test" modal="true" resizable="true" >
<h:form>
<portal:runtime portletName="com_liferay_social_privatemessaging_web_portlet_PrivateMessagingPortlet"/>
</h:form>
</p:dialog>
<p:dialog id="test" widgetVar="test" modal="true" resizable="true" >
<h:form>
<portal:runtime portletName="com_liferay_social_privatemessaging_web_portlet_PrivateMessagingPortlet"/>
</h:form>
</p:dialog>
Hi Neil,
am taking another path to impl. this and not using portlet:runtime, but appreciate your help and time.
Thank you,Zarina
am taking another path to impl. this and not using portlet:runtime, but appreciate your help and time.
Thank you,Zarina
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™