PDA

View Full Version : How to make panel components and it's variable reset after setActive in card layout



swapnilwarekar
27 Apr 2011, 4:23 AM
Hi folks,

I just used the Content panels in card layout. When I activates or reactivates ( calls setActive method of card layout), I need panel to be reset or all it's variable value to be reset.

I tried using method clearState but did not worked.

I also tried by making the new object of the panel and added it to card layout and the activated it.
It worked for the refreshing the data but some times It is not activating the panel. It is showing the
blank white container.

Will you please help me?

haseeb
4 Jul 2011, 8:04 PM
Hi,

Iam having an app which has basically a carousel in which there is a deck of cards. The first card is the login followed by the other cards. So when the user clicks the logout button i change the setActiveItem to zero (0) ie login. However when next time the user makes a login the previous states of the card or items is still seen.

Can someone tell me how to reset this state. Right now when the user clicks on the logout button iam just doing window.location = "index.html" which refreshes the whole app and resets the card state. But this way my app would not be faster. Any help on this would be great...

regards,
Haseeb