Forums de discussion
How to open portlet as pop up from another portlet
ankit yakkundi, modifié il y a 13 années.
How to open portlet as pop up from another portlet
Regular Member Publications: 221 Date d'inscription: 05/03/10 Publications récentes
Hi..
I am using Liferay 6 and plugin sdk.
I have created 2 database portlet.
the first portlet has a combo box and submit button.When the user selects the value from the combo box and click on submit button,then a popup portlet should be opened.
this popup should be my second portlet which i have created.
this portlet have email id and password fields and checkbox button.when the user clicks on the submit button ms outlook should be opened where the to field should have value coming from the portlet's email id field and in body password should be copied and if the user has checked the checkbox then value selected from the combo box should be copied in the body of the mail.
do anyone has any idea how to do it??
Any idea or suggestions are welcome..
Thanks in advance...
I am using Liferay 6 and plugin sdk.
I have created 2 database portlet.
the first portlet has a combo box and submit button.When the user selects the value from the combo box and click on submit button,then a popup portlet should be opened.
this popup should be my second portlet which i have created.
this portlet have email id and password fields and checkbox button.when the user clicks on the submit button ms outlook should be opened where the to field should have value coming from the portlet's email id field and in body password should be copied and if the user has checked the checkbox then value selected from the combo box should be copied in the body of the mail.
do anyone has any idea how to do it??
Any idea or suggestions are welcome..
Thanks in advance...
jelmer kuperus, modifié il y a 13 années.
RE: How to open portlet as pop up from another portlet
Liferay Legend Publications: 1191 Date d'inscription: 10/03/10 Publications récentes
The portlet that is opened in the popup should have
set in liferay-portlet.xml
Then it's just a matter of loading that portlet in a popup. The url you need to use would look something like this
If you need to pass along parameters based on the selected value in the combo box you need to use the javascript api
<add-default-resource>true</add-default-resource>
set in liferay-portlet.xml
Then it's just a matter of loading that portlet in a popup. The url you need to use would look something like this
PortletURLFactoryUtil.create(request, "1_WAR_myportlet",
layout.getPlid(), PortletRequest.RENDER_PHASE);
If you need to pass along parameters based on the selected value in the combo box you need to use the javascript api
AUI().use('liferay-portlet-url', function(A) {
var url = Liferay.PortletURL.createActionURL()
.setPortletId("1_WAR_myportlet")
.setParameter("parametername", value)
.setWindowState("exclusive");
...
});
ankit yakkundi, modifié il y a 13 années.
RE: How to open portlet as pop up from another portlet
Regular Member Publications: 221 Date d'inscription: 05/03/10 Publications récentes
Hi Jelmer/All,
Thank you very much for your quick response.
Could you please give some more details on this. Like i am not able to understand where and how to use the code given by you.
Like for example, i have portletA and portletB. On the click of a button in portletA, it should open the view.jsp page of portletB in a POPUP.
What files do i need to accomplish this?
Any kind of suggestions or ideas would be of great help.
Thanks & Regards,
Ankit.
Thank you very much for your quick response.
Could you please give some more details on this. Like i am not able to understand where and how to use the code given by you.
Like for example, i have portletA and portletB. On the click of a button in portletA, it should open the view.jsp page of portletB in a POPUP.
What files do i need to accomplish this?
Any kind of suggestions or ideas would be of great help.
Thanks & Regards,
Ankit.
jelmer kuperus, modifié il y a 13 années.
RE: How to open portlet as pop up from another portlet
Liferay Legend Publications: 1191 Date d'inscription: 10/03/10 Publications récentes
You can open a popup, in the way i describe on
http://www.liferay.com/community/forums/-/message_boards/message/7074351
http://www.liferay.com/community/forums/-/message_boards/message/7074351
ankit yakkundi, modifié il y a 13 années.
RE: How to open portlet as pop up from another portlet
Regular Member Publications: 221 Date d'inscription: 05/03/10 Publications récentes
hi..
thanks for the reply.
i read the steps,but i am still confused where i need to mention the code??
since i have two portlets and each having many files.
so actually where i need to paste the code and what all changes i need to make?
as far as i have understood the code has to be pasted in the view.jsp of the 1st portlet from where i need to open another portlet as popup.
can you please tell me how can i pass the argument from portlet to popup??
thanks in advance..
thanks for the reply.
i read the steps,but i am still confused where i need to mention the code??
since i have two portlets and each having many files.
so actually where i need to paste the code and what all changes i need to make?
as far as i have understood the code has to be pasted in the view.jsp of the 1st portlet from where i need to open another portlet as popup.
can you please tell me how can i pass the argument from portlet to popup??
thanks in advance..
ankit yakkundi, modifié il y a 13 années.
RE: How to open portlet as pop up from another portlet
Regular Member Publications: 221 Date d'inscription: 05/03/10 Publications récentes
hi..
thanks for the reply..
Can you please explain what i need to do??
can i get some examples of pop up portlet.
i have created pop ups in 5.2.3,but i have having some trouble in 6.
so please guide me.
what will be the url,how will i call the pop up.
since i have two portlets,which i want to open.
Any idea or suggestions are welcome..
Thanks in advance...
thanks for the reply..
Can you please explain what i need to do??
can i get some examples of pop up portlet.
i have created pop ups in 5.2.3,but i have having some trouble in 6.
so please guide me.
what will be the url,how will i call the pop up.
since i have two portlets,which i want to open.
Any idea or suggestions are welcome..
Thanks in advance...