Can I create a hidden portlet in my portal page? - Websphere

This is a discussion on Can I create a hidden portlet in my portal page? - Websphere ; The function I want to achieve is that: I want to position 3 portlets in a portal page, A,B,C 1) When user get into this page, he can only see the portlet A & B,but not C. 2) After user ...

+ Reply to Thread
Results 1 to 13 of 13

Thread: Can I create a hidden portlet in my portal page?

  1. Can I create a hidden portlet in my portal page?

    The function I want to achieve is that:
    I want to position 3 portlets in a portal page, A,B,C
    1) When user get into this page, he can only see the portlet A & B,but not C.
    2) After user click a button in portlet A, the Portlet C will show out with maximun size(means the user can only see portlet C now.)
    3) Then if user click a button in portlet C, it will come back to step 1), means Portlet C will dispear again.

    Essentially, what I want to know is how to hide a portlet in the portal page.

    The WPS version is IBM WebSphere Portal 5.1.0.1.

    Can this function be supported ?
    And how?

    Thanks

  2. Re: Can I create a hidden portlet in my portal page?

    Perhaps you can use 2 pages for that?

    page 1 with portlet A and B, page 2 with portlet C maximized.
    and your button is only a link to page 2/page 1.

    fabchap.

    > The function I want to achieve is that:
    > I want to position 3 portlets in a portal page,
    > A,B,C
    > 1) When user get into this page, he can only see the
    > portlet A & B,but not C.
    > 2) After user click a button in portlet A, the
    > Portlet C will show out with maximun size(means the
    > user can only see portlet C now.)
    > 3) Then if user click a button in portlet C, it will
    > come back to step 1), means Portlet C will dispear
    > again.
    >
    > Essentially, what I want to know is how to hide a
    > portlet in the portal page.
    >
    > The WPS version is IBM WebSphere Portal 5.1.0.1.
    >
    > Can this function be supported ?
    > And how?
    >
    > Thanks




  3. Re: Can I create a hidden portlet in my portal page?

    What about creating a custom skin that shows nothing in any state but
    maximized? Then, in the maximized state, the portlet renders based on
    a simple "if" statement being true.

    You can determine the "state" of a portlet using portal's API.

    Good luck.

    D


    wrote:
    > Perhaps you can use 2 pages for that?
    >
    > page 1 with portlet A and B, page 2 with portlet C maximized.
    > and your button is only a link to page 2/page 1.
    >
    > fabchap.
    >
    > > The function I want to achieve is that:
    > > I want to position 3 portlets in a portal page,
    > > A,B,C
    > > 1) When user get into this page, he can only see the
    > > portlet A & B,but not C.
    > > 2) After user click a button in portlet A, the
    > > Portlet C will show out with maximun size(means the
    > > user can only see portlet C now.)
    > > 3) Then if user click a button in portlet C, it will
    > > come back to step 1), means Portlet C will dispear
    > > again.
    > >
    > > Essentially, what I want to know is how to hide a
    > > portlet in the portal page.
    > >
    > > The WPS version is IBM WebSphere Portal 5.1.0.1.
    > >
    > > Can this function be supported ?
    > > And how?
    > >
    > > Thanks



  4. Re: Can I create a hidden portlet in my portal page?

    Does it mean the page 2 must be postitioned in the same level as My Portal page?

  5. Re: Can I create a hidden portlet in my portal page?

    I don't think that is obligatory

  6. Re: Can I create a hidden portlet in my portal page?

    Hi there,


    This is a tricky one. It all comes down to "how" hidden portlet C must be.

    Do you hide it because of security reasons and/or does your portlet C need preset values from portlet A? Should portlet C be able to work alone?

    Normally you wouldn't programatically alter the visibility for a portlet, you let the portal admin hide it using the security settings available in the portal. In other words - you shouldn't hide it in any other way since it breaks common design and usage of portlets.
    Putting it on a different page won't hide it, more than just not showing it together with portlet A and B.

    A different solution would be to let doView() in portlet C, when in normal window state, just show an empty body. And while in maximized state present whatever you want.
    To get from portlet A to portlet C in maximized state afaik you need to use C2A or wiring (depends on whether you use JSR168 or IBM portlet) since you have to trigger portlet C processAction() from portlet A processAction().

    To switch back, all you have to do is make it revert to normal state, thus rendering the other portlets as normal.


    But I wonder what you want to accomplish? Being a J2EE designer, this example presents a tight coupling between portlets and dependencies which is generally a bad thing.
    Is there a possibility to refactor the concept?

    /Jonas V
    Certified System Administrator - WebSphere Portal v5.1
    Certified Solution Developer - WebSphere Portal v5.1

  7. Re: Can I create a hidden portlet in my portal page?

    Doing some research in this matter, I have to revert some of my prior statements.

    You might be able to use the perzonalization portlets, setting up rules for the page. in WPS v6.0 they are a little less obscured (having visibility modifiers), but from what I can see you'd still be able to use it. So have a look at it on the infocenter.
    http://publib.boulder.ibm.com/infoce...f/cm_intr.html


    This is an area which I don't use so much, so my help with personalization are limited...

    /Jonas V

  8. Re: Can I create a hidden portlet in my portal page?

    In order to prevent getting into this page 2 by navigator, so can not create the page 2 under my portal page, right?

  9. Re: Can I create a hidden portlet in my portal page?

    Though portlet C need preset values from portlet A in sometime, but
    the portlet C can work alone as well.

    Why I need to hide it , it just comes from customer's requirement.
    The customer wants the portlet A be the only entry of portlet C.

  10. Re: Can I create a hidden portlet in my portal page?

    It seems the rules are the new function implement in WPS v6.0, while I am using WPS 5.1.

    It will be a good way if I can change to WPS v6.0.

    Thanks


  11. Re: Can I create a hidden portlet in my portal page?


    Combining those requirement I can only think of two solutions, which are (of course) more or less ugly workarounds:

    1, Using noSkin on portlet C in conjunction with rendering a empty body while in normal state. When C gets an action from A, it will go to maximized state and render as defined by you.

    pros:
    * It's an easy solution, you don't have to mess around with security settings

    cons:
    * Tight coupling to the noSkin ,umm, skin.
    * portlet C can't be displayed on its own in normal state(you could provide a edit mode for it where you can add a normalRender boolean to switch behavior)


    2, Use security groups to modify visiblity. Set portlet C to be only usable by a certain group. When the user triggers the action in A, put the user in the specific role and forward to C.

    pros:
    * C don't need a lot of code for visibility management. It's handled by the portal.

    cons:
    * You have to add code for authorization which can be very tricky.
    * Interoperability problems. You might have to put C on a different page because the portal may have problem to recognize the group switch/add before rendering, thus not showing C if it's on the same side(I never tried it, so I'm not sure).


    Closing statements - theres got to be a better way in WPS 5.1, but I can't think of one right know. I'll look deeper into this when I have more time.

    /Jonas V

  12. Re: Can I create a hidden portlet in my portal page?

    Yes, thank you very much
    There is no ordinary and simple way for this requirement.

    Every approach like play a trick to the server.

    I will try your solution, and will try to look more deep into it.

    Thanks




  13. Re: Can I create a hidden portlet in my portal page?

    Hi jonvik,

    Your second solution seems to fit into our requirements but i am really not sure how to put a user into a specific group through the code?
    Could you please elaborate on this?





+ Reply to Thread