06-27-07 06:22 PM
I'm just inquiring around if anyone ever tried to dynamically change the Por
tlet Window state using the JSR-168 API.
I am trying to write a utility function that will set the portlet Window sta
te to MAXIMIZED on the page. I am having trouble as the method to set the Wi
ndow 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 pag
e (click submit).
I want to avoid placing a javascript tag on individual jsp pages.
For example:
<script>
window.location="<portlet:renderURL windowState='Maximized'/>&quo
t;;
</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);
[ Post a follow-up to this message ]
|