Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About changing window state of a portlet without a ActionResponse

 
wei luo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, guys,
I am a student trying to develop a portal in my group project, and I met a problem and would really appreciate if you can provide some help.
There are two of those portlets in our application, namely ConfigPortlet and DisplayPortlet, in the ConfigPortlet, the user choose the content they want to see, and the DisplayPortlet displays the content. This can be done following the "session and interportlet communication" example in a book I bought "Building portals with the java portlet API". But one addtional requirement is that when the user click on the submit button in the ConfigPortlet, it minimizes itself, and maximizes the DisplayPortlet. Minimizing the ConfigPortlet is easy, since there is an ActionResponse object being generated when the submit button is click, we can do that in the ProcessAction method or we can do that after generating the PortletURL object using response.createActionURL(). But I am stuck in how to maximize the DisplayPortlet, since there is no ActionResponse object being generated in this portlet, it just get the session data from the ConfigPortlet......
Above is my problem and thank you in advance.
Regards,
Logan
 
Sivaji Somanathan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

You would need to invoke an action in the Display portlet to change the Window State .This could be done by Wiring the Config Portlet to the Display portlet.So when you click on the Submit in Config Portlet the Action in the Display Portlet would get called and you would get the handle for ActionResponse .This way the window State could be changed.Hope this helps.


regards,
Sivaji.S
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you've pretty much addressed the issue. Yup, it's an issue.

To change the way the portlet is viewed, you need to get into its event phase, but you can't do that from another portlet.

-Cameron McKenzie
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sivaji Somanathan:
Hi ,

You would need to invoke an action in the Display portlet to change the Window State .This could be done by Wiring the Config Portlet to the Display portlet.So when you click on the Submit in Config Portlet the Action in the Display Portlet would get called and you would get the handle for ActionResponse .This way the window State could be changed.Hope this helps.


regards,
Sivaji.S


How is 'Wiring the Config Portlet' done?

What I am thinking is by using the Session or Request object. The Config can store a variable there, and the render method of Display will consult the variable, if any.
 
Bigwood Liu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Wei,

Do not know your design intention. If the config is for personalization, do not use 2 portlets. Use one portlet and implement doEdit instead.

It would be even better if you are using IBM portal. There is a CONFIG mode as a customized mode, by using this mode you can config your display portlet for any page where you put your portlet. In addition, check EDIT_DEFAULTS for more information, which allow you config individual portlet, meaning if you have put one portlet twice onto a page, you can config the portlets differently.
 
Alberto Amarga
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I do have an almost the same problem.

Here's the scenario,
>>I have a contacts portlet which has list of link, click a form-link then a form will appear, copy the URL then paste it to other Browser or send it through email.
>>Paste the URL then a log-in portlet will appear, here's the problem. After I logged in it will redirected me to contacts portlet but the windowState is still maximized, the question is how can I reset the windowState to normal after i logged in?

Any answer is highly appreciated...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic