Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Milan Kostoláni
Popping up portlet window
December 5, 2012 4:35 AM
Answer

Milan Kostoláni

Rank: Junior Member

Posts: 92

Join Date: July 26, 2012

Recent Posts

Hello everyone,

I want to pop up the portlet window, after clicking on submitting button. Here is source I used in JSP file :
 1<%
 2
 3PortletURL payWithStampURL2 = renderResponse.createRenderURL();
 4payWithStampURL2.setWindowState(LiferayWindowState.POP_UP);
 5
 6String popup = "javascript:popup('"+ payWithStampURL2.toString()+"');";
 7
 8
 9%>
10
11<aui:script>
12    Liferay.provide(
13        window,
14        'popup',
15        function(url) {
16            var A = AUI();
17
18            var data = {};
19
20            var dialog = new A.Dialog(
21                {
22                    centered: true,
23                    destroyOnClose: true,
24                    draggable: true,
25                    height: 330,
26                    width: 343,
27                    resizable: false,
28                    modal: true,
29                    title: 'Book Details'
30                }
31                ).render();
32                    dialog.plug(
33                        A.Plugin.IO,
34                        {
35                            data: data,
36                            uri: url
37                        }
38                    );
39            },
40        ['aui-dialog', 'aui-io']
41    );
42</aui:script>


However I originally had 3 steps portlet, 1st is submit form with continue button, 2nd is with information about object created from form and button for Confirmation and the 3rd is summary. And I want to have 2nd window step in Pop Up, but with this code it always pop-up just first and I cant load my portlet class so no logic occurs too.

If I used in my portlet class ActionResponse.setWindowState(LiferayWindowState.POP_UP);
It is showed in new window not floating pop up in old window.

Look forward for your help.
Milan Kostoláni
RE: Popping up portlet window
December 12, 2012 6:57 AM
Answer

Milan Kostoláni

Rank: Junior Member

Posts: 92

Join Date: July 26, 2012

Recent Posts

Actually the question is how to make both to happen Action and Render, the code showed before do just Render part, but the Action part is missing and if I use the response parameter for Render, I wonder if I can somehow load the popup.

Or is there any way to send object together with Render or to send bean any further?


Any help is appriciated.
gordon daniels
RE: Popping up portlet window
December 12, 2012 1:31 PM
Answer

gordon daniels

Rank: Liferay Master

Posts: 690

Join Date: August 23, 2008

Recent Posts

Hi, I would go to the community project AUI. There is code already for creating a portlet popup. Maybe useful for you.

good luck
Milan Kostoláni
RE: Popping up portlet window
December 13, 2012 2:17 AM
Answer

Milan Kostoláni

Rank: Junior Member

Posts: 92

Join Date: July 26, 2012

Recent Posts

Hello,

thx for responding, but I think you mean this one : http://www.liferay.com/community/liferay-projects/alloy-ui/demo?title=community-liferay-projects-alloy-ui-demos-dialog

and actually that is opening just some dialog, but what I need is also sending ActionRequest/Response.