Restarting A Flex Application Programmatically

Howdy folks,
I have just created a database driven user management system
which works wonders, but I'm having a problem with logging out a
user. By far the easiest, sure fire way of doing this would be to
clear the users login in the database (not really relevant to the
problem) then restart the application programmatically (as if the
user pressed the refresh button in thier browser) which would bring
them back to the login screen at the start of the application. Is
re-initialising the application possible to do in actionscript?
If not it would involve clearing user specific variables,
resending http requests which relate to the login, removing
permissions based controls and all this over many modules... just a
hell of a lot of what may be unesscessary work, especially if all
that really needs to happen is the application to re-initialise.
Any help on this would be amazing!
Many thanks

quote:
Originally posted by:
mattyb1515
My initial suggestion is to wrap your flex application in a
PHP web page and let PHP do the authentication/deauthentication. To
logout the user you can create a PHP function that destroys the
session variable and then refresh/redirect to the login/home page
of your application.
Thanks for the reply but I'm afraid it isn't as easy as that.
I'm a php guru and I do use PHP and FlashVars for use with
authentication but only to 'remember' user information when the
user opens up a different application (basically if they log into
one application, theyre logged into the rest). Using 'out of
application' authentication is of no use when it comes to a
permissions based user system and applying dynamic permissions
(such as "this user can see this menu", "this user cant press this
button") to a flex application. It's clearing these permission
variables I'd prefer not to do if the application can be
programmatically re-initialised which would have the same
effect.

Similar Messages

  • Workspace no longer works when using flex application as Form

    Hi,
    I've got a problem in the Workspace with one of my process that use a flex application as form.
    I used the tutorial "Creating Flex® Applications Enabled for LiveCycle® Workspace ES" to create the flex application and it works well in the workspace (displays ok and datas well passed to the process).
    The task completes well because my process fires the next step with all the datas filled in the task.
    But after the end of the task (when I click on the submit button of the form) the Workspace is no longer usable.
    I can no longer access preferences, messages, starting process panel... when a click on an item in any Menu nothing occurs. Everything is blocked.
    I must restart the Workspace to be able to use it again.
    Can someone help me please?

    I think I have it solved, will check...
    When modifying, the P3 in the go url was left out. what was P2 should be P3 and the correct P2 would have the table.column name.

  • Network error in flex application

    Hi
    I am working on a flex application, sometimes I get error message saying that 'Send failed',
    Can anyone help me how to get rid of this message and how to show proper user friendly message..
    I think its basically due to network failure...
    Thanks and Regards
    Aruna.S.N.

    Thanks Subeesh... I will check it...
    If  we restart the server then it will work and suddenly sometimes it gives the error like 'send failed'...
    Thanks & Regards
         Aruna.S.N.

  • Flash won't run the flex application (swf)

    I'm Italian so my english isn't perfect....
    I try to run a flex application (swf) on a pc without flash
    player 9 (8.5) (on firefox and IE)....the flex application ask
    correctly if i want to install the flash player....but anyway,
    after the installation....the flex application doesn't run....
    also, i try to restart the pc....but....swf doesn't
    run.....anybody have the same problem ??

    Hung program: command-option-esc
    Shut down: hold down power button for 5-10 seconds.

  • Multiple Flex applications

    I have a project with about 20 Flex applications. When I
    include a single one of them as default application, everything
    works well. However, when restarting Flex builder, the framework
    includes all of them automatically and runs into a memory overflow
    error. The same happens, when I click the gree 'Run' button. Flex
    includes all of the applications, although I chose just a single
    one on the Project properties/Applications tab and hangs.

    Thanks for this information.
    #1 is automatic for all MXML applications in the root folder.
    You are correct, this did not happen
    in previous Beta releases.
    Can you tell me, when #2 happens, do you have all the 20
    files open for editing (either in the code
    editor or the design view)?
    Mark Shepherd
    FlexBuilder Engineering
    Alex Bernhard wrote:
    > Hi,
    > #1 When you include an a mxml application to the list of
    applications via the
    > Project / Properties panel, the application icon gets a
    green arrow in the
    > navigator panel. I usually have a list of many mxml
    application with just one
    > of them marked with a green arrow and listed in the
    Project/Properties/Flex
    > Applications tab. Now it happened to me, that, after
    moving my project to my
    > Laptop, all of the applications have been marked with
    that green arrow. This
    > never happened with Beta 2.
    >
    > #2 The memory overflow error was shed by the Java
    Runtime,/ Eclipse. I got the
    > opportunity to close the workbench or to work further.
    There seems to be a
    > maxumum possible mxml applications that can be handled
    at once.
    >
    > #3 Eclipse doesn't respond to user inputs anymore and
    has to be killed with
    > the task manager.
    >
    > I will try if this only happens, when I move the project
    without closing it
    > first or if it happens in every case.
    >

  • Stop flex application to load after clicking of stop button on browser

    Hi,
    I am running in a problem where i have the flex application, while loading the application in the middle of the application page i want to stop loading the application on clicking of browsers stop button.
    Please help me....
    thanks in advance...

    One technique woudl be to create a new button that the user would interpret as the submit button (I will call this a pseudo submit button). You would make the real submit button invisible (so the user cannot see it or click on it, but it can still be used programmatically). Now on the pseudo submit button put your code to validate your information. If this validation passes then click the real submit button. To do this run this code:
    submitbuttonname.execEvent("click");
    If the validation fails then put a message up. In this technique the real submit cannot be pushed until the validate succeeds.
    Hope this helps.

  • Flex application running under AIR takes a long, long time to start.

    I have a flex application which runs on a desktop under AIR. The application has an assets folder with 3,500 mp3 soundclips totalling about 50MB. The problem is, the application takes around 90 seconds to load. I'm sure that AIR is scanning the application folder and doing something with the contents because if I delete the assets folder it loads in about 5 seconds. Does anyone know why AIR/Flex would do this, and why it doesn't exhibit the same problem if I run or debug in Flexbuilder on eclipse? It's making my killer app unusable!
    Thanks
    Paulo

    Well, I've spent a bit longer looking at this now, and the problem appears to lie with my encrypted local store. The first thing that happens is for the app to read the product key from the ELS. But, it fails (for some unknown reason). So, the app seems to hang there for 90 seconds until it eventually renders the welcome screen. If I remove the assets folder it still fails to read from the ELS, but only takes a couple of seconds to start the welcome screen. This is where the scanning of the application folder seems to come into play, because if I remove the code which reads from the ELS the app starts within 2 seconds whether the asset folder is there or not.
    I think the slow startup and the scanning of the assets folder are just symptoms of a different problem, i.e. a problem with the ELS. I don't have the same problem with my development environment though - it's only when I test deploy the application.
    Thanks for your help on this problem EgorKDie. I think I should be able to resolve it once I can sort out why the ELS is being awkward.

  • How to show double byte data in a Flex application

    Hi
    I am looking for a way to show UTF-8 formatted data in a Flex
    application. I have a Java app in the backend that generates an xml
    file. Some attributes in the file are encoded in UTF-8 (when data
    is Japanese or Chinese...). My Flex app is showing box characters.
    I have XSLT app that generates html based off this xml file. The
    browser i showing the Japanese characters fine.
    I am wondering what the trick is to get Flex app show this
    data.
    Thanks
    Videoguy

    It turned out to be my XP that didn't have the the right lang
    sets installed. I have two PCs. On one everything showed up fine. I
    was able to view arabic, chinese data from xml just fine. On the
    other one, same swf didn't show them. There is MS knowledgebase
    article on how to enable east asian languages etc. I didn't give it
    a try. I am using other pc for my dev now.

  • What to look for in a web hosting company for Flex applications

    Hello,
    I am trying to figure out what I need to look for in a web
    hosting company if I want to deploy my own Flex applications? I
    don't anticipate having any special requirements other than the
    ability to interact with databases and XML files. Can someone help
    me figure out what the server-side requirements are?
    Thanks in advance!
    Matt

    then almost 99.9% hosting will work.
    if you want a Flexx app with compiler then oo thats different
    but as you say "I don't anticipate having any special requirements
    other than the ability to interact with databases and XML files"
    then you can go with pretty much any hosting, as long as they have
    apache, Database serve and I think thats it.

  • How to Call a AIR application from Flex Application

    Hi,
        I have Used AIR (Desktop application) in Flex Builder to Upload a File from a local path and save it it a server path.
    I need to Call this AIR(Desktop application) from my Flex Application.... i.e
    I am using a link button to send a event using Script and Forward that Desktop application  from Flex Screen
    But it doesnot load that (Desktop application)  in Screen. Only Balnk screen is loaded from path
    Here is the code
    AIR(Desktop application)
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="openBrowseWindow();">
    <mx:HTTPService id="urlpath" showBusyCursor="true" useProxy="false" method="
    POST" url="http://localhost:8080/nat/FlexAction.do?method=UrlPath"result="pathresult(event)"
    fault="faultHandler(event)"
    >  
    </mx:HTTPService> 
    <mx:Script>
    <![CDATA[
    import mx.events.FileEvent; 
    import mx.rpc.events.ResultEvent; 
    import mx.rpc.events.FaultEvent; 
    import mx.utils.ObjectUtil;  
    import mx.controls.Alert;
    private  
    var openFile:File = new File() 
    private  
    function openBrowseWindow():void{openFile.addEventListener(Event.SELECT, onOpenFileComplete);
    openFile.addEventListener(Event.OPEN, load);
    openFile.browse();
    private  
    function load():void{Alert.show(
    "load"); 
    var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png"); 
    //var textTypes:FileFilter = new FileFilter("Text Files (*.txt, *.rtf)", "*.txt; *.rtf"); 
    var allTypes:Array = new Array(imageTypes);openFile.browse(allTypes);
    private  
    function faultHandler(event:FaultEvent):void { 
    //Alert.show("Fault")Alert.show(ObjectUtil.toString(event.fault));
     private  
    function pathresult(event:ResultEvent):void{Alert.show(
    "res") 
    //Alert.show(ObjectUtil.toString(event.result));}private  
    function onOpenFileComplete(event:Event):void{ 
    //mx.controls.Alert.show("event: "+event.target.nativePath +"UR!!!"); 
    var pPath = event.target.nativePath; 
    var parameters:Object = {FlexActionType:"PATH",path:pPath};  
    // Alert.show("Image Selected from Path : "+pPath); urlpath.send(parameters);
    //Alert.show("Passed.."+parameters);}
    ]]>
    </mx:Script>
    <mx:Button click="openBrowseWindow();onOpenFileComplete(event)" name="Upload" label="Upload" x="120.5" y="10"/> 
    Here is Mxml Code for Flex Application
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="http://ns.adobe.com/air/application/1.0.M4" >
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert; 
    private function Upload():void{ 
    // CursorManager.setBusyCursor();  
    //var url:String = "HomeAction.do?method=onLoad"; 
    //var url:String = "assets/Air.swf"; 
    var url1:URLRequest = new URLRequest("assets/Air.swf");navigateToURL(url1,
    "_self"); 
    // CursorManager.removeBusyCursor(); }
    ]]>
    </mx:Script>
    <mx:LinkButton id="up" click="Upload()" x="295" y="215" label="UpLoad"/>
    In this code i forward using s url to Open tat  Desktop application but a blank screen appears with out the proper output...
    Please Help me in this to forward AIR from Flex Screen..
    Thanks in Advance
    With Regards
    Gopinath.A
    Software Developer
    First Internet Systems Pvt. Ltd.,
    Chennai

    try this
    http://www.leonardofranca.com/index.php/2009/09/17/launching-an-installed-air-application- from-the-browser/
    regards
    Leonardo França
    Adobe Certified Expert Flex 3 with AIR
    Adobe Certified Expert Rich Internet Application Specialist v1.0
    Adobe Certified Expert Flash CS3 Professional
    Certified Professional Adobe Flex 2 Developer
    Adobe Certified Professional Flash MX 2004 Developer
    http://www.leonardofranca.com
    http://twitter/leofederal
    Manager AUGDF - Adobe User Group do Distrito Federal
    http://www.augdf.com.br
    http://twitter/augdf

  • Hi All,i am currently working on a flex application that will allow the user to change the language

    Hi All,i am currently working on a flex application that will allow the user to change the language within the application from english to Japanese and vice versa. And everything works fine.
    I am using flex 4.5
    We allow the user to save records with english or japanese texts.
    problem
    When the user manually enters Japanese text and tries to save it the record defaults back to the default name (which is in english). But if you copy the entered text and paste it and then save it.It works fine.
    Any idea , why this is happening?
    Please let me know if the question is not clear.
    Looks like there was already a bug
    https://issues.apache.org/jira/browse/FLEX-28894?page=com.atlassian.jira.plugin.system.iss uetabpanels:all-tabpanel
    Not sure why does it say , Resolved .
    -KB
    Message was edited by: bKartik.b

    By Payal integration , you mean paypal button html ? or payment gateway setup etc ? If its a gateway configuration for your site domain then single page for all layout will work , but if you are using button code for all renditions then you would need to create separate pages for all.
    Thanks,
    Sanjit

  • Flex application not working when deployed run from Server

    Hi,
    I have Flex application which takes a parameter from user, makes a web-service call and returns the message.
    This application is running perfectly when I launch from IDE.
    But when I copy the files from bin-release to server and launch it, it gives me no result.
    In the crossdomain file on the server which hosts web-service, I have added the my host IP in the
    allow-access-from domain tag.
    In the initialization method of the application I load crossdomain using following code:
        Security.allowDomain("remoteservername");
        Security.loadPolicyFile("http://remoteservername/crossdomain.xml");
        var request:URLRequest = new URLRequest("http://remoteservername/crossdomain.xml");
        var loader:URLLoader = new URLLoader();
        loader.load(request);
    Is there a way I can debug application when running from server?
    Please give me some pointer to solve this problem.
    Thank you.
    Chintan

    Alex thanks for reply
    The URL for the app is http://<some_IP>/flex_app
    <some_IP> is added in crossdomain.
    Also we have outbound IP's and of these are also added in the crossdomain file.
    This is the current content of crossdomain file:
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="<some_IP>"/>
    <allow-access-from domain="<outbound_IP1>"/>
    <allow-access-from domain="<outbound_IP2>"/>
    <allow-access-from domain="<outbound_IP3>"/>
    <allow-http-request-headers-from domain="<outbound_IP1>" headers="SOAPAction"/>
    <allow-http-request-headers-from domain="<outbound_IP2>" headers="SOAPAction"/>
    <allow-http-request-headers-from domain="<outbound_IP3>" headers="SOAPAction"/>
    </cross-domain-policy>
    App runs perfectly fine when launched from Flex Builder.

  • Flex Application does not work outside of the default dir

    Hi,
    I have developed a flex application which calls a http
    service and displays the contents in a text area.
    This works fine when I execute it from the flex builder or
    from the directory where the flex builder stores it.
    If I copy the files to any other dir or the server, after
    making http call no result is displayed in the text area.
    Is there any thing else i need to do other building
    application in flex builder for deployment.
    Please help,
    Thanks in advance,
    Chintan

    "rtalton" <[email protected]> wrote in
    message
    news:gjlmvm$hrv$[email protected]..
    > Stubborn, aren't we? Ok, let me try again:
    > You only use "loadPolicyFile" to load a non-default
    policy file. remove
    > that
    > line from your code.
    > Also you do not need this line:
    > flash.system.Security.allowDomain("*");
    > ...in your code. Remove it. This is used when you have
    two SWFs on two
    > different servers. You do not.
    >
    > Again, read this page:
    >
    >
    http://livedocs.adobe.com/flex/3/html/help.html?content=deployingoverview_12.htm
    > l
    >
    > Your answer is there.
    > Hint: all you need is to *properly* deploy a
    cross-domain policy file.
    > Really.
    > I'm being very honest here. Have I ever lied to you
    before? No, I haven't.
    > So
    > you're buying the first round tonight after work, ok?
    Some people will do anything for a date ;-)

  • I have a Mac Pro using OSX 10.7.4.  When using apple mail I click on the address icon to obtain email address and nothing happens.  I've restarted both the application and the Mac but still won't open address book.  Any ideas please.

    I have a Mac Pro using OSX 10.7.4.  When using apple mail I click on the address icon to obtain email address and nothing happens.  I've restarted both the application and the Mac but still won't open address book.  Any ideas please.

    Assuming you have these accounts set up in Mail, open preferences and under Accounts tab, edit the SMTP outgoing server list. Do you have a .mac address in the list? If so, delete it.
    Are you using iCloud?
    For the troubled account, select the correct SMTP server for that account in the box and check the box to use only that server with that account.

  • How to do single sign on for multiple webservices in flex application

    Hi Experts,
    I have created a flex application and using few webservices in that application. When I run the application its asking logon details for each and every webservice I used. However I want to do single sign On without providing logon details for each and every webservice.Please suggest me.
    Thanks and advance.

    Hi,
    if yout projects are deployed in their own Java EE context root then you have multiple applications, though logically you count them as one. Use OSSO or Oracle SSO (where OSSO should be fine since all deployments share the same instance)
    Frank

Maybe you are looking for

  • I have a 2006 15" Macbook Pro with a broken Superdrive and my external USB one just quit working

    Why can my LG Portable Super Multi Drive (GP08NU6B) burn discs, but not read them? Right after I burn a DVD successfully, I stick it back in the drive and it says "The disk you have inserted is not readable by this computer"  I have a 2006 15" Macboo

  • Downloading a DVD into iMovie or iphoto

    A friend shot a video and burned a copy in iMovie for me, is there anyway to download the DVD into iMovie on my Mac? Thanks!

  • Problem repairing Photoshop Elements 6

    I have had Photoshop Elements 6 happily running under Windows 7. However, it now will not load.I have tried to repair it, but when I run the insatllation disk, and select repair, it asks me to insert Disk 1. But there is no Disk 1!!. When I tried to

  • Macintosh hd icon

    Is there anyway I can change the icon of macintosh hd on the desktop??

  • Copy header text of Delivery to Shipment

    Hi All, Please let me know the user/customer exit to copy the header text of delivery to shipment while creation(VT01N) or deletion(VT02N) of shipment for deliveries. Please provide the code samples or procedure, if you have any. Thanks in advance an