[flexcoders] Using sessions in flex

2009-03-05 Thread kotha poornima
Hi All,
Iam getting some issues in Flex. I have two pages in my project one is for 
non-admin and another for admin users.
A link will be shown for non-admin users and not for admin users. While the 
user is logging in, if the username and password are wrong then it will 
automatically redirected to non-admin page and a link is showing up there. This 
is the actual scenario.

This working fine when we are executing admin or non-admin at a single time. If 
in Mozilla if i first execute non-admin page in the first tab so a link will 
come for me. And in the other tab i am executing admin page. Now the link will 
not be shown in admin page. So its not showing any link in the admin page but 
its also not showing in non-admin page also. Non-admin page is affecting by 
admin page data.

Admin and non-admin pages are identified based on Admin flag coming from the 
database. For admin page admin flag is 1 and non-admin page admin flag is 0. If 
admin flag is 0 only that link ll be shown. So at the first time if the user 
execute non-admin page admin flag is 0 and link ll be shown. If the user 
execute admin page admin flag is 1 and link ll not be shown. So the admin flag 
is changing to 1 and the link is also not showing in non-admin page also..

So here the problem is how can i save the admin flag value according to the 
session. Are we able to use sessions in Flex so that i can save the admin flag 
in the session and i access it based on the session id.

Hope u got my problem!! Plzzz help me if anyone faced this issue before..

Thanks in Advance,
poornima



  

Re: [flexcoders] Using sessions in flex

2009-03-05 Thread Jeffry Houser


Flex doesn't have the concept of pages the same way that an HTML 
application does. 

Store your session state as part of the Flex App (AKA in the client).  
And you can hide/unhide sections of the app based on the login 
credentials. 


kotha poornima wrote:

Hi All,
Iam getting some issues in Flex. I have two pages in my project one is 
for non-admin and another for admin users.
A link will be shown for non-admin users and not for admin users. 
While the user is logging in, if the username and password are wrong 
then it will automatically redirected to non-admin page and a link is 
showing up there. This is the actual scenario.


This working fine when we are executing admin or non-admin at a single 
time. If in Mozilla if i first execute non-admin page in the first tab 
so a link will come for me. And in the other tab i am executing admin 
page. Now the link will not be shown in admin page. So its not showing 
any link in the admin page but its also not showing in non-admin page 
also. Non-admin page is affecting by admin page data.


Admin and non-admin pages are identified based on Admin flag coming 
from the database. For admin page admin flag is 1 and non-admin page 
admin flag is 0. If admin flag is 0 only that link ll be shown. So at 
the first time if the user execute non-admin page admin flag is 0 and 
link ll be shown. If the user execute admin page admin flag is 1 and 
link ll not be shown. So the admin flag is changing to 1 and the link 
is also not showing in non-admin page also..


So here the problem is how can i save the admin flag value according 
to the session. Are we able to use sessions in Flex so that i can save 
the admin flag in the session and i access it based on the session id.


Hope u got my problem!! Plzzz help me if anyone faced this issue before..

Thanks in Advance,
poornima






--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust