This may be a very silly question, but I am stuck on this and
can not find a suitable solution, please advise.
I have an application where the first screen is a login
screen, when a user logs in he is redirected to a diferent view
based on the users login permissions etc. The problem is whenever
we hit the F5 browser button the wrapper file is refreshed and the
embeddd swf (flex app) is reloaded reinitializing all the
application variables etc. This takes the screen view back to the
login screen although the user is logged.
How can I handle this?
I tried using shared objects but this would meen storing
every value in shared object. Is there any easier way out? Any
configuration change etc.
You can handle security and authentication in your J2EE
server with the web.xml configuration file under the exploded WAR
directory \flex.war\WEB-INF if you use Flex Data Services,
LiveCycle Data Services ES or Blaze DS.
You specify what the login and error pages are. When you try
and access the Flex wrapper in the browser, you will be redirected
to the login page if you are not already logged in. If you are
already logged in, there will be no redirection.
You could also look into "deep linking" - a new feature in
Flex 3. This would enable you to restore your application back to a
previous point.You'd have to periodically save the user's location
in a SharedObject so that when the app has restarted you can open
the SharedObject and retrieve the last location.
This would fall squarely in the "advanced Flex" category, so
please read all the docs, create some proof-of-concept
applications, etc. before revising your application.