|
|
I'm just inquiring around if anyone ever tried to dynamically change the Portlet Window state using the JSR-168 API.
I am trying to write a utility function that will set the portlet Window state to MAXIMIZED on the page. I am having trouble as the method to set the Window state only exists on the Action Response object, not Render Response.
This is the basic flow.
User will be forwarded to a page.
Based on model logic, the user will be forwarded to different pages and the corresponding portlet will be either MAXIMIZED or MINIMIZED depending on the outcome of the logic.
No Action Response was made because the user didn?t do any action on the page (click submit).
I want to avoid placing a javascript tag on individual jsp pages.
For example:
<script>
window.location="<portlet:renderURL windowState='Maximized'/>";
</script>
Is there a way that I can programmatically set the Window State with only a render Response object available?
I also tried casting the RenderResponse to ActionResponse, but I got a huge stack trace for my effort.
ActionResponse actionResponse = (ActionResponse) pResponse;
ActionRequest actionRequest =
(ActionRequest) portletRequest;
((ActionResponse) pResponse).setWindowState(
WindowState.MAXIMIZED);
|
|