Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
Ravi Kiran
Liferay 6: Portlet View in MAXIMIZED State
14. April 2012 14:44
Antwort

Ravi Kiran

Rang: Junior Member

Nachrichten: 53

Eintrittsdatum: 7. April 2012

Neue Beiträge

Once the request is made to the MVCPortlet class , i want to show the View in MAXIMIZED State . This is my Code in JSP Page

<portlet:actionURL name="addBook" var="addBookURL" />
<aui:form action="<%= addBookURL.toString() %>" method="post">
<aui:input type="text" name="name"></aui:input>
<aui:input type="password" name="pwd"></aui:input>
<aui:button type="submit"></aui:button>
</aui:form>
This is my MVCPortlet class :

if(true)
{

response.setPortletMode(PortletMode.VIEW);
response.setWindowState(WindowState.MAXIMIZED);

}

else
{

response.setPortletMode(PortletMode.VIEW);
response.setWindowState(WindowState.MAXIMIZED);

}
And this is the result (Please see the image below )

My question is that , i was expecting that once the Action class is called , so the Portlet will be displayed in MAXIMIZED State .

But still the Portlet remains in NORMAL State , please let me know why ?and how can i Portlet View in MAXIMIZED State after the result from MVCPortlet class .
Riccardo Ferrari
RE: Liferay 6: Portlet View in MAXIMIZED State
15. April 2012 03:23
Antwort

Riccardo Ferrari

Rang: Regular Member

Nachrichten: 137

Eintrittsdatum: 13. November 2010

Neue Beiträge

Hi,
your code should work ok. I've tried it on LR 6.1.
Are you defining your action class as:
1
2public void addBook(ActionRequest actionRequest, ActionResponse actionResponse){
3...
4}


You can achieve the same result setting the WindowState when defining the action URL in your JSP:
1
2<portlet:actionURL name="addBook" var="addBookURL" windowState="<%=WindowState.MAXIMIZED.toString() %>"/>


Hope it helps
Ravi Kiran
RE: Liferay 6: Portlet View in MAXIMIZED State
15. April 2012 11:11
Antwort

Ravi Kiran

Rang: Junior Member

Nachrichten: 53

Eintrittsdatum: 7. April 2012

Neue Beiträge

Thanks its working now , i restarted the system and it was working , without doing any changes at all.