WebSphere Portal Server - Dynamically changing Portlet Window State

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > June 2007 > Dynamically changing Portlet Window State





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Dynamically changing Portlet Window State

2007-06-27, 1:22 pm


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);


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com