This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
Joined: May 14, 2005
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.
Cameron Wallace McKenzie
author and cow tipper
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.
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.