PDA

View Full Version : [CLOSED] Portlet Close Handler



gs_user
Aug 15, 2012, 10:40 AM
Hello,

I want to read/write db when i close portlet
when i running, Cause the page is blank...

i create portal,PortalColumn,portlet in code-behide, what is my problem?

...
...

Portlet p = new Portlet()
{
ID=title,
Title = title,
Height = 200,
};

//↓ i'm using wrong?
p.Listeners.Close.Handler = "function() {#{DirectMethods}.ClosePortlet(e.panel.id, e.columnIndex, e.position);}";

--------------------------------------


[DirectMethod(ShowMask = true)]
public void ClosePortlet(String id, int col_index, int position)
{
//DO DB READ/WRITE
}

Daniil
Aug 15, 2012, 11:37 AM
Hi,

I don't think there are the following arguments available within a Close handler.

e.panel.id, e.columnIndex, e.position

Please see the available arguments:
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.panel.Panel-event-close