sujeetkr
5 Aug 2012, 10:53 PM
Hi,
Requirement: If user is not logged in show him, login window, otherwise show him dashboard.
Approach Used: In ViewPort, I created two card : loginWindowCard and dashboardCard. Based on user login status, set the active card.
Problem : 1) Since I am using card layout, I have to load all view, even before user logins.
-> Dashboard is created even before user is login to the site
-> Its stores are loaded. That is service call is made to fill store for dashboard. Since useris not logged in, so service return empty data.
Need suggestion: 1) Is card layout is good solution for above situation? Is there any alternative?
2) If I have to use card layout, then can I dynamically add the card? Like if user is not logged in, then only add loginWindowCard. As soon as user logs in, add the dashboard card and make it active.
3) How can I implement, if card exits then make it active, otherwise create a card and add it to card layout and then make it active ?
Thanks,
Sujeet
Requirement: If user is not logged in show him, login window, otherwise show him dashboard.
Approach Used: In ViewPort, I created two card : loginWindowCard and dashboardCard. Based on user login status, set the active card.
Problem : 1) Since I am using card layout, I have to load all view, even before user logins.
-> Dashboard is created even before user is login to the site
-> Its stores are loaded. That is service call is made to fill store for dashboard. Since useris not logged in, so service return empty data.
Need suggestion: 1) Is card layout is good solution for above situation? Is there any alternative?
2) If I have to use card layout, then can I dynamically add the card? Like if user is not logged in, then only add loginWindowCard. As soon as user logs in, add the dashboard card and make it active.
3) How can I implement, if card exits then make it active, otherwise create a card and add it to card layout and then make it active ?
Thanks,
Sujeet