Forum Stats

  • 3,852,465 Users
  • 2,264,106 Discussions
  • 7,905,072 Comments

Discussions

Page/Portlet Reload/Refresh

LBROCKS
LBROCKS Member Posts: 34
edited Sep 15, 2008 6:44PM in WebLogic Portal
I have two jsp page based portlet which host two application(Flash based application),i.e each page has one jsp portlet, but every time I switch around tabs the portlets reload, This process initializes the whole jsp portlet. I would like avoid this page/portlet reload behavior. I think the way to do is to use backing file at the page level or at the portlet level, but I am not sure which method to override since prerender completely stop rendering the page at all.

Thanks

Answers

  • 650850
    650850 Member Posts: 843
    I'm not sure I understand exactly what you mean by wanting to stop the "page/portlet reload behavior". Every time you switch tabs, the portal control tree is rendered with the new page and portlets that are "in view", and this means that the portlets on the page will get re-rendered, including running through the JSP again. If you want to stop the JSP render from happening again, and no state has changed on the portlet since you last viewed it, portlet caching may be what you are looking for. There is some information on portlet caching at http://edocs.bea.com/wlp/docs102/portlets/performance.html but unfortunately this points to a document on the BEA dev2dev site which has now been moved to http://www.oracle.com/technology/pub/articles/dev2arch/2005/01/portlet_caching.html

    By caching the content of the portlet, it should only be re-rendered (and have the JSP re-run) when the cache expires due to timeout or a state change in the portlet.

    Returning false from preRender in the backing file will abort rendering of the control (page or portlet) entirely, and you will see no content at all-- as you have already noted.

    If by "stopping the page / portlet reload behavior" you mean to stop the Flash-based initialization, I'm not the person to answer the question.

    Hope this helps!

    Kevin
  • 648793
    648793 Member Posts: 96
    Hi
    Try one of these:
    1) try setting Render Cachable to true if you want to cache the portlets output.
    2) If you want to save hit on the backend operations then you can cache the backend data and reuse the same.

    Hope it helps
  • LBROCKS
    LBROCKS Member Posts: 34
    Thanks for the quick reply although both the solutions as suggested is not working for me, here is a very generic problem rather than a problem specific to mine.
    Lets say you have two portlet where in one portlet you are showing a simple e-mail application & another portlet where you have all the schedule information (OK don't get into the design). lets say while typing halfway a e-mail you just remembered to check some thing on schedule portlet, so you switch to schedule portlet check some thing & come back to e-mail portlet, At this moment you will see completely a new e-mail portlet (At this time you have lost a half composed e-mail unless you have saved that half composed e-mail in the db or some where else while switching, if saved then you have to retrieve that e-mail) I am looking for a solution where the e-mail portlet page does NOT have to do any thing, that way I don't have save any thing & just continue from where I left off. Just like a browser where you can open another tab check some thing else and come back.


    Thanks
  • 650850
    650850 Member Posts: 843
    There is no way to what you describe in the WLP portal framework without modifying your portlet code. If the user doesn't submit the changes to a portlet (your email portlet, for example) before clicking on another tab, there is no way for the server to know what the user did with the (email) portlet. The only way to implement the functionality you described is to use Javascript on the client (AJAX) to save off the partially-typed email before changing the page.

    Kevin
  • 648793
    648793 Member Posts: 96
    I agree with Kevin. You have to implement something like you see in gmail (compose email) i.e javascript.
  • LBROCKS
    LBROCKS Member Posts: 34
    Forget about two two portlet, Even in a single portlet if you minimize your portlet then maximize you will lose all data(Portlet goes back to its initial state). I am not sure how other portal developers are dealing with this kind of problem.

    Thanks
    Lalit Barik
This discussion has been closed.