Dynamically changing Portlet Window State
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > Dynamically changing Portlet Window State




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Dynamically changing Portlet Window State  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:05 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register