gerartje
8 Jul 2010, 10:34 AM
Hello,
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 :-)
thanks
grtz
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 :-)
thanks
grtz