• 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

show/hide portlet?

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

How do I show/hide a portlet in a portal page in Websphere portals.

I have 4 portlet, but, initially the only portlet that should display is just the Welcome page portlet, and the other portlet will only show on the same page when its link has been clicked.

Is there anyway in rules where i can only set a rule like
'Show Portlet when conditon=value otherwise hide' instead of applying whole rule for the entire portal page.

Please help. Thanks.
 
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
The invisible portlet is actually a pretty tricky thing to implement. I've had a number of customers ask, and have done a few hacks to make it happen. I'm not sure, but I think WebSphere Portal 6 has an invisible feature, but not earlier versions. I haven't seen it, and it may have been a dream, but I thought I saw something about it somewhere.

Anyways, here was one trick I used. It was actually for a portlet that should be invisible unless there was an 'alert'. What we did was we had the portlet output nothing in the view mode unless there was an alert. Then, we applied an invisible skin, where no icons or outlines were used. As a result, the portlet was only visible when there was an alert - other times, the user didn't even know it was there.

It's not exactly what you are asking, but maybe it'll give you some ideas.

You might want to rethink your layout though. That's probably better.

If logging in triggers the other portlets to appear, maybe you should just make it security based. The one portlet has anonymous access, and the others do not have anonymous access. Once a user logs in, the portlets that are on the page, but do not have anonymous access, magically become visible.

Just some ideas for you.

-Cameron McKenzie
 
pulijala hari
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cameron,

Thank you for the insight.
It will be very nice if you would share the code.
Can we apply different skins to portlets on a single page..
I was only able to apply skins and themes to an entire portal page rather individual portlets on a single portal page?

Please throw some ideas on this.

regards,
hari
 
Cameron Wallace McKenzie
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
Indeed, you can apply different skins to different portlets on a page. There is one however: a theme can define which skins are valid, and for consistency sake, most themes only allow one skin. You have to ensure that multiple skins are allowed for a theme, including the invisible skin.

I apologize for not having the invisible skin. It's at a client site I worked at a few years ago when WebSphere Portal 5.0 was the hot ticket. Someone who develops skins should be able to put one together quickly. It's probably the simplest skin you could do, because there's nothing there.

I still think access restrictions might be the right way to go.

Good luck,

-Cameron
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know in Weblogic 8.1 you can set "entitlements" of whether a portlet is visible or not by the role of the person who is logged in. Alternatively, I know you can also get access to the "desktop" of the portal application, then get all of the portlets associated with the desktop, and make specific portlets visible/invisible by the name/id of the portlet. Anyways, I'm not sure how this relates to Websphere, but I hope it helped somewhat.
reply
    Bookmark Topic Watch Topic
  • New Topic