Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rupesh Chotai
Custom portlet in MAXIMIZED mode
November 20, 2012 7:59 AM
Answer

Rupesh Chotai

Rank: Regular Member

Posts: 163

Join Date: March 23, 2011

Recent Posts

Hi,
I am trying to display my portlet in full screen mode. In my portlet class, which is extending MVCPortlet, I have added below code:

 1
 2@Override
 3    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) {
 4        try {
 5            actionResponse.setWindowState(WindowState.MAXIMIZED);
 6        } catch (Exception e) {
 7            e.printStackTrace();
 8        }
 9       
10    }
11
12@Override
13    public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
14            throws PortletException, IOException {
15        ...
16                ...
17                PrintWriter out = resourceResponse.getWriter();
18               JSONObject jsonObject=new JSONObject();
19        jsonObject.put("results",new JSONArray());
20        jsonObject.put("data",new JSONArray());
21                   jsonObject.put("misc",new JSONArray());
22                out.write(results);
23                 ....
24}
25         


However whenever I start the portal, this portlet is not displayed in full screen.
I tried options like adding my portlet id in portal-ext.properties portlet.add.default.resource.check.whitelist. But no success.

Need suggestion / help.

Thanks.
Rupesh Chotai
RE: Custom portlet in MAXIMIZED mode
November 20, 2012 8:18 AM
Answer

Rupesh Chotai

Rank: Regular Member

Posts: 163

Join Date: March 23, 2011

Recent Posts

Hi,

I have added 1-column layout to the page which causes portlet to occupy whole width of the page but not the height. Any idea how to make this custom portlet occupy whole screen.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!