8 Jul 2010 10:34 AM #1
passing data from one card to another
what's the best way to pass data to another card?
Assume I have a card with 3 dates and one detailCard.
Depending what I have clicked on the first screen I want to show different content.
Now I work like this:
I make a variable in my index.js, lets say "var selectedDay".
When I click a button, I set the variabele "selectedDay" and call "setCard(detailCard)"
DetailCard is an empty card (Panel component) with a listener added --> beforeactivate
When beforeactivate is fired, I call the correspondig handler with a "this.update(selectedDay)" call, to fill the content within the panel.
This works, but not always, sometime my panel is just empty. What am I doing wrong :-)
8 Jul 2010 2:02 PM #2
i would prefer to fire your own event in your application scope and include the information you need as params. than on your panel which should show the information, add a listener to you event and onYourEvent update the content of your panel.
8 Jul 2010 2:08 PM #3
seems logic :-)
I have done it the quick and dirty way now, time was against me :-)
By calhau in forum Ext GWT: DiscussionReplies: 4Last Post: 20 Oct 2009, 5:09 AM
By craigorymaas in forum Ext 3.x: Help & DiscussionReplies: 3Last Post: 28 Sep 2009, 11:17 AM
By technokrafts in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 13 Jul 2009, 9:20 PM
By paulSC in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 15 Jan 2009, 10:11 AM
By priyanka_iknip in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 10 Sep 2008, 6:36 AM