PDA

View Full Version : [CLOSED] Closing a Portlet



rvanderpol
Oct 09, 2008, 2:41 PM
I've noticed that the ExtJS Portal sample (http://extjs.com/deploy/dev/examples/portal/portal.html) has the ability to close portlet windows, but I can't seen to reproduce this via the Coolite Portlet control. Is this functionality not currently implemented? If not, how would one go about adding it?

geoffrey.mcgill
Oct 09, 2008, 3:22 PM
Each Portlet is just a Panel, so setting Closable="true" should add the closing "X" tool to the Portlet. 

Hope this helps.

rvanderpol
Oct 09, 2008, 3:33 PM
I'm using version 0.6.0.7019 and neither the Portlet nor the Panel class has a Closable property. Am I using an old version? Or did I misunderstand your answer?

Vladimir
Oct 09, 2008, 4:15 PM
Hi,

you can use Tools in the Portlet



<Tools>
<ext:Tool Type="Close" Handler="panel.ownerCt.remove(panel, true);" />
</Tools>

rvanderpol
Oct 09, 2008, 8:22 PM
Perfect. Thanks.

geoffrey.mcgill
Oct 10, 2008, 10:22 AM
The Portal Example has been updated to demonstrate adding a "Close" Tool to each Portlet and trigger an AjaxEvent when the Portlet is closed/hidden, see http://examples1.ext.net/#/Portal/Basic/Simple/

Hope this helps.