• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About changing window state of a portlet without a ActionResponse

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...

reply
    Bookmark Topic Watch Topic
  • New Topic