On Jan 29, 2007, at 7:23 AM, Vitaly Baranovsky wrote:
Good day!
How can I hide portlet programmatically?
I have portal with "today news" portlet. I need this portlet was
hidden if
there is no one news today. So, I need programmatically query
database to
check if there are news for today, and hide portlet
programmatically if
there no one (with its title and all decoration elements).
How can I do it?
Thanks!
Making the check for your portlet content is trivial
To hide the portlet decorator, I don't know of any feature off hand
to do this programmatically
take a look at the default portlet decorator:
#set($solo = $jetspeed.MappedWindowState.toString()=="solo")
#if (!$solo)
...
render title bar
#end
The portal has the concept of a "solo" state
But setting the solo state, say, in a portlet action is not allowed:
response.setWindowState(new WindowState("solo")
Will you be making this check in the render or action phase?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]