try to throw a portlet exception and configure the portal in jboss-portal.sar/conf/config.xml such as it does not display portlets that throw exceptions.
pretty ugly I know, but should work.
Hehehe. I have tried launching an UnavailableException, but when I execute the page for the first time, it displayes: "No portlet available". If I refresh the page, the portlet dissappears, good, but I can't make it visible again.
You can't have this sort of behaviour from within the portlet, as the portal will have already called it and its render, decorated it, and aggregated it on to the page.
Thanks so much :).