PDA

View Full Version : transfer the data from one grid in centerpanel to another grid in east panel



venumuvva
11 May 2010, 12:03 PM
Hi All,

My application viewport has north , west and center panels. The center panel has iframe in it. for each click on west panel menu link, the center panel is refreshed with new data/jsp. Now, I am trying to build a shopping cart in east panel (thinking to add new east panel to viewport). This shopping cart should get the data from centerpanel grid when user clicks on add to cart button in grid's toolbar. How can I get the reference of east panel/grid from centerpanel so that i can put an event when user clicks on add to cart button?

screenshot attached..

Thank you very much for the help

venumuvva
11 May 2010, 2:25 PM
Can you guys provide some help/inputs on this topic?

gevik
11 May 2010, 3:17 PM
As I understand this, your application is actually two applications. One in the center panel, which is an iframe hosting a page with a gridpanel,
second the east/west/north panels which wrap the iframe panel (center panel).

One way you could communicate from iframe/grid with your east panel is through the window.top object of your gridpanel page.

The code would look something like:

// in the east panel page
window.eastpanel = Ext.getCmp('eastPanelID');

// in the gridpanel/iframe page
window.top.eastpanel.foo();

The objects are super visible when you investicate a little with furebug.

I hope this helps somewhat.