The navigateToURL influences the Alert PopUp behavior

Hello all!
  Working on my project in Flex 4 Prem I've met the strange
model of behavior when I call navigateToURL method after creating
Alert popup window: being run the program does not wait user's mouse
click on OK button on Alert popup. Instead it displays the popup for
a sec and go to the next statement in source code: navigateToURL()
function's call.
  If I comment this navigateToURL() call, the program's behave returns
to normal as it is suppose to be: it waits until user clicks on the OK
button on the Alert popup window. The simple model of the source code
you can se below.
Please, help me to understand what I've done wrong.
Thanks a lot in advance!
Andrey Suntsev
The code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <s:layout>
       <s:BasicLayout/>
    </s:layout>
    <fx:Script>
        <![CDATA[
        import mx.controls.Alert;
        import mx.core.FlexGlobals;
        private function show_Messages(_event:MouseEvent):void
            Alert.show("Click OK");
            navigateToURL(new URLRequest(FlexGlobals.topLevelApplication.url), '_self');
        ]]>
    </fx:Script>
    <s:Button id="submitButton"
              label="Show message"
              click="show_Messages(event);" />
</s:Application>

@Uasav,
Something like this should work:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;
            import mx.core.FlexGlobals;
            import mx.events.CloseEvent;
            protected function show_Messages(evt:MouseEvent):void  {
                Alert.show("Click OK", "", Alert.OK|Alert.CANCEL, null, alert_closeHandler);
            protected function alert_closeHandler(evt:CloseEvent):void {
                switch (evt.detail) {
                    case Alert.OK:
                        navigateToURL(new URLRequest(FlexGlobals.topLevelApplication.url), '_self');
                        break;
                    case Alert.CANCEL:
                        // ignore
                        break;
        ]]>
    </fx:Script>
    <s:Button id="submitButton"
              label="Show message"
              click="show_Messages(event);" />
</s:Application>
Peter

Similar Messages

  • Styling the Alert popup window

    In Flex 3, you could style the popup window produced by Alert.show with the Alert selector:
    Alert
      background-color:aqua;
    This appears not to work any more in Flex 4, even with the appropriate namespace prefix:
    mx|Alert
        background-color:aqua;
    I've confirmed that the selector is correct, because it can be used to modify the fonts within the Alert popup, but any colors, corner radius settings, etc. are ignored. I also tried switching to the Halo AeonGraphical theme with no success.
    Are there any new tricks to know about in this area?
    Thanks,
    David

    Hello,
    Does this article help?
    http://www.adobe.com/devnet/flex/articles/flex3and4_differences_02.html
    This code seems to work:
    <fx:Style>
        @namespace mx "library://ns.adobe.com/flex/halo";
        mx|Alert   
            contentBackgroundColor:aqua;
    </fx:Style>
    - Rob

  • Customising the Alert popup

    Hi Flexers
    The following works in changing some of the properties of the
    Alert
    <mx:Style>
    Alert {
    backgroundColor: yellow;
    color: blue;
    cornerRadius: 10;
    headerHeight: 30;
    shadowDistance: 5;
    highlightAlphas: 0,0;
    headerColors: white, red;
    fontSize: 13;
    fontFamily: Georgia;
    </mx:Style>
    Please advise on the following:
    1) fontFamily: Comic Sans MS; didn't give me the font I
    expected. Does flex support this?
    2) the yellow background colour looks good but I couldn't get
    rid of the default greyish border. How can I turn the whole
    backgroud into the colour I want?
    3) Can I increase the margin between the button and the
    border? The default margin was too narrow.
    Looking forward to hear from you. I Fung

    Try this:
    Alert {
    backgroundColor: yellow;
    color: blue;
    cornerRadius: 10;
    headerHeight: 30;
    shadowDistance: 5;
    highlightAlphas: 0,0;
    headerColors: white, red;
    fontSize: 13;
    fontFamily: Georgia;
    message-style-name:"messageStyle";
    border-thickness:0;
    padding-bottom:10;
    .messageStyle {
    fontFamily:"Comic Sans MS";
    The message-style-name allows you to set text properties for
    the message of your Alert. You can set the fontFamily, fontSize,
    color etc.
    The border-thickness set to 0 will remove the default grey
    border. Or you can set the border-color, to change the color to
    something that matches your yellow background.
    The padding-bottom property will increase the margin between
    the Alert butons and the bottom of the container. Likewise,
    padding-top will increase the margin above the Alert text.
    I hope this helps.
    Vygo

  • How to Use the alert in popup

    Hi all,
    I have created a popup with some fields. Doing mandatory fields validation in the button of popup. Popup is called from the button by using the show popup behavior.
    In the button action method, if the mandatory fields are missing am raising the alert by using the below code:
    FacesMessage msger = null;
    msger =
    new FacesMessage("Inside Validate");
    msger.setSeverity(FacesMessage.SEVERITY_ERROR);
    FacesContext.getCurrentInstance().addMessage(null, msger);
    It is showing the alert. But it closes the popup. My requirement is should not close the popup when the alert is showing.pls guide me in this.
    Regards
    C.Karukkuvel
    Edited by: C.Karukkuvel on Dec 27, 2010 3:57 AM

    Hi,
    For ur Case u need to open and close the popup programatically.....
    Open Popup : Open Popup Programmatically
    Close Popup : how to close a popup by backing bean?
    Remove the show poupbehaviour
    Define popup type as none and inside the buttonbar facet of the dialog have ok cancel buttons... In the buttons have the closing logic of the popup after ur validations gets passed
    Regards,
    Suganth.G

  • How to show javascript alert popup after commandLink action?

    Hi,
    I'm building an ADF-based .jspx page. I have a commandLink whose action calls a method in my page's backing bean. I want to show a javascript alert popup when the commandLink is clicked and after the backing bean method has been called. The text displayed in the alert popup is dependent on whether the processing in the method was successful or not.
    I couldn't figure out how this could be done though. It doesn't seem I can use the onClick attribute on the commandLink because that gets called before my backing bean method gets called. From my backing bean method, is there some way to launch a javascript alert popup and show certain text in it based on what happened in the method?
    Thanks for any ideas.

    Hello and thank you for your reply,
    I am trying to combine dwr and ADF.
    When I use the following code to grasp the input value from the user
    FacesContext fc = FacesContext.getCurrentInstance();
    ValueBinding expr = fc.getApplication().createValueBinding("#{bindings['LIMARXESPORTCODE_bindVariable2'].inputValue}");
    setLIMARXESPORTCODEbindVariable( expr.getValue(fc).toString() );
    in order to use it as a dynamic bind variable to the where clause of the following query:
    vo.setWhereClause("LIMARXESPORTCODE = :LIMARXESPORTCODE_bindVariable");
    vo.defineNamedWhereClauseParam("LIMARXESPORTCODE_bindVariable", null, null);
    vo.setNamedWhereClauseParam("LIMARXESPORTCODE_bindVariable", LIMARXESPORTCODEbindVariable );
    executeAndShowResults(vo);
    in the backing bean java code. All I get as an output from a javascript alert window is null.
    However, when the bean member variable LIMARXESPORTCODEbindVariable has a
    hard coded, static value i.e. LIMARXESPORTCODEbindVariable = 111; and the first code snippet is commented out, everything works just fine!
    Any hint is welcome,
    T I A.

  • How to increase the iCal Alert Popup BOX height?

    I would like to be able to increase iCal's Alert popup box to show more than two concurrent alert notifications at one time.  Ideally, this popup box would dynamically size itself to the number of active alert notifications up to the available screen space.  A second less elegant solution would be to enable the user to resize the iCal Alert popup box manually.  A third  even less elegant solution would be to statically redefine a new default height in terms of either active alert notifications or pixels.  Anything would be better than the limitations currently in place...
    Here is an example of three concurrent alerts.  In this case, the user must scroll down within the iCal Alert popup box to see Alert #3.

    Hi
    It's not at all possible.
    If you want to use a textbox with muliple line items... you need to use Text Edit control. If you want to use that click on the following link for clear information:
    http://help.sap.com/saphelp_nw04/helpdata/en/7d/fe9f668af411d3805e00c04f99fbf0/frameset.htm
    Regards
    Surya.

  • [svn:fx-trunk] 9180: When another popup is going away as the alert is going up, the Alert can get validated inside of addPopUp and its centering logic never got the event it expected .

    Revision: 9180
    Author:   [email protected]
    Date:     2009-08-07 15:11:43 -0700 (Fri, 07 Aug 2009)
    Log Message:
    When another popup is going away as the alert is going up, the Alert can get validated inside of addPopUp and its centering logic never got the event it expected.
    add the event listener earlier so it is ready if we get validated inside addPopUp
    QE Notes: versioning/baselines/mp_alert_mask_compatible.png needs updating.  I think the current baseline is incorrect.
    Doc Notes: None
    Bugs: SDK-22819
    Reviewer: darrell
    tests: checkintests mustella/components/alert
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22819
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as

    Hi or2tx2002, 
    We're really sorry to learn of all the equipment issues you've experienced in the last year. In order to discuss your replacement options, I ask that you please PM me with your wireless number, a contact number and a good time to reach you. I will be happy to reach out to you and bring resolution to this matter. 
    Thank you and I look forward to hearing from you soon. Make it a great day! 

  • Since upgrading to Mail 7.0 the menu popup from right clicking an element in an email has changed.

    Since upgrading to Mail 7.0 the menu popup from right clicking an element in an email has changed.  There is now only a short three item menu:
    Previously there was a longer menu (like the one when right clicking an item on a Safari page):
    I've looked in Preferences and at all the Mail dropdown items but can't find any way to get the old menu back (or why it changed).  In particular, I miss the "copy image" item which allowed me to copy an item image into a new email for forwarding.  I've got two email accounts, an IMAP and a POP.  The behavior is the same with both.
    Any ideas?
    Thanks,
    Richard

    Your screen shots are not visible to me.  But I think I understand your question.
    Several thoughts come to mind:
    rbhix wrote:
    In particular, I miss the "copy image" item which allowed me to copy an item image into a new email for forwarding.
    You can still, of course, simply forward the entire email message containing the image.
    You could also use the "Save Attachment ..." feature available when you right click and copy and paste from there once the image is saved.
    Less likely, you could also use the "Share" feature available when you right click, though I suspect it may not offer sharing options that you would like.

  • Multiple TaskFlow instances in the UIShell - popup and dynamic tab

    Hi all,
    I have strange situation with JDev 11.1.1.6
    First, I run the one, fragment based, bounded TF (named TF_A) in the one dynamic tab.
    Also, run another TF (named TF_B) in the second dynamic tab.
    Then, from that second dyn tab, I run second instance of the first TF, so TF_A, this time as a static region in the af:popup.
    However, the instance in the popup does not show the jsf fragment at all.
    This occurs _only when another instance of the same TF is already running elsewhere (on the first dynamic tab)
    Otherwise, the TF_A in the popup behaves properly.
    The TF_A does not have Controller transaction, and this behavior does not depend on the Sharing Data Controll setting. Is the same in both cases.
    I am able to close the popup, and the application continues to behave normally.
    Of course, there is no stackTrace anywhere.
    Any advice ?
    Anyone ?
    Edited by: Cvele_new_account on Mar 1, 2013 4:08 AM

    Hi Frank, thanks for response.
    Do you think that somehow in my case there is only one instance of the TF_A ?
    Here is relevant settings for my popup containing static region with TF_A
              <af:popup id="pB55" contentDelivery="lazyUncached"
                        popupFetchListener="#{myBean.crudPopupFetchListener}"
                        autoCancel="disabled" childCreation="deferred">
                <af:panelWindow ...>
                  <af:region value="#{bindings.TF_A.regionModel}" id="r6"
                </af:panelWindow>
              </af:popup>myBean.crudPopupFetchListener :
       //Task flow activation code (for the TF binding 'active' property  bellow)
       pageFlowScope.put("pB55", "true);
       // code for setting the TF parameters:
       .....and here i setting for TF_A binding from the pageDef:
        <taskFlow id="TF_A"
                  taskFlowId="..."
                  activation="conditional"
                  xmlns="http://xmlns.oracle.com/adf/controller/binding"
                  Refresh="ifNeeded" active="#{pageFlowScope.pB55 eq true}">
          <parameters>
          </parameters>
        </taskFlow>

  • Can I disable the alert "the referenced account is currently locked out..."

    I posted the following on the answers site but was recommended to post here
    http://answers.microsoft.com/en-us/windows/forum/windows_7-security/can-i-disable-the-alert-the-referenced-account-is/0af4441c-2f70-4452-a876-7c582fbd6530
    A client has asked me to enable an account lockout threshold on their domain.
    I have made the appropriate changes in Group Policy and also configured an email notification under Task Scheduler that is triggered by Event ID 4740 appearing in the security log. http://community.spiceworks.com/scripts/show/1588-send-email-on-account-lock-out
    It was when testing this that I noted after the nth incorrect password, I received an on screen alert "the referenced account is currently locked out and cannot be logged on to"
    I tested again with an invalid username and did not get the same message. This is potentially a problem because it means that an attacker sees a difference between a valid username and an invalid username without being required to know any correct
    passwords.
    Is there any way that I can disable this on screen alert so that attackers are not presented with a means to validate usernames?
    I am already aware that account lockouts are no longer in favour for other reasons and have informed the client about the possibility of a denial of service attack that deliberately triggers these lockouts and taken certain steps to mitigate the
    effects.
    However, given that an informed decision has been made to stick with the account lockout policy I would like to be able to mitigate this other undesired consequence if at all possible.

    Hi Matt,
    I understand your concern, although I wasn’t able to find a way to disable or change these embedded Windows messages.
    With Account Lockout policy enabled, the risk that accounts being hacked has been reduced a lot. In addition, we can monitor security logs to determine whether hacking behaviors exist or not.
    More information for you:
    Audit Policy Recommendations
    http://technet.microsoft.com/en-us/library/dn487457.aspx
    Configuring Audit Policies
    http://technet.microsoft.com/en-us/library/dd277403.aspx
    Best Regards,
    Amy

  • My ipad was is displaying an alert message " A wi-fi connection is required to download your apps and media". So it has been connected to the internet over night and this morning but is still displaying the alert message and it won't go away. what to do?

    Hi,
    My name is Norbert. I am having some difficulties restoring my icloud back up. My ipad was doing an icloud back up and the alert message displayed on the ipad after my internet was interrupted "A wi-fi connection is required to download your apps and media".
    I got the internet working, my ipad is receiving internet network but the alert message is still displayed on the ipad and won't go away, to make matters worse the ipad is frozen and i can't do anything.
    Please can anyone with a similar experience tell me what to do in this situation?
    Thank you

    Welcome to the Apple Community.
    Have you tried a hard restart. Press the on/off button and homescreen buttons together until the device shuts down.

  • Include URL in the Alert message in Sitescope Alert

    Hi,
    I am trying to include the URL int he Evetn mapping but unable to fidn the Attribute to include the URL in the alert. Please suggest.

    Hi,
    If this is a static URL then you can include it in alert by modifing the alert templates under templates.mail in installed directory. In case of dynamic URL's put them under group/monitor description feild nad include it in alert using the tag like "Monitor:  <groupID>:<name> <groupDescription>" in alert template.
    Regards,
    Sujith

  • IPhone Jabber client not showing internal extensions just the Alerting Name

    I have customer calling from a 7965 to his desk phone 7965 which shows both Alerting Name and Extension, he also has an iPhone/Jabber Client on WiFi (no cellular involved). The iPhone client shows the Alerting Name from the 7965 but doesn’t show the 4 digit internal extension. Is this a known issue?

    Dear Miro,
    The issue has nothing to do with the server it's the client, Lync 2013 issue with caching data and the way its reading it back from the cache.
    Work around:
    just create a new client policy using the command new-csclientpolicy with AddressBookAvailability  "WebSearch" only.
    "New-CsClientPolicy -Identity TestCsPolicy -AddressBookAvailability WebSearchOnly"
    assign the policy to your test client, delete cache folder at the client end.
    "Grant-CsClientPolicy -Identity MIRO -PolicyNameTestCsPolicy"
    "you can delete sign-in information by signing out and clicking on "delete sign-in info" then sing-in again"
    test again. it should work.
    if it didn't open contact card and check if the the client is getting the data correctly.
    yet i didn't find another fix to the issue with lync 2010 client everything works just fine without any changes.
    Regards,
    Nader Barakat

  • How to write the custom Function Module to trigger the Alert.

    Hi all,
    I have developed a custom alert category in Tx - alrtcatdef. Now i want to trigger it from my custom function module. what should i do or what is the procedure to trigger the alert from my custom function module.
    Arul Jothi

    hi arul,
    try this program.
    RSALERTTEST.
    check out this link...
    <a href="/people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts:///people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
    regs,
    jaga

  • Error in the alert Log

    Hi There,
    Recently I started seeing these errors in the alert log for one of the databases:
    Tue Aug 04 05:05:00 2009
    Errors in file c:\oracle\product\10.2.0\admin\xxxxxx\bdump\xxxxxx_j000_6104.trc:
    ORA-12012: error on auto execute of job 130961
    ORA-27370: job slave failed to launch a job of type EXECUTABLE
    ORA-27300: OS system dependent operation:accessing execution agent failed with status: 109
    ORA-27301: OS failure message: The pipe has been ended.
    ORA-27302: failure occurred at: sjsec 9
    ORA-27303: additional information: The pipe has been ended.
    So, I tried looking at the trace file associated with the error, and here is what I get:
    $ cat ebcd01_j000_6104.trc
    Dump file c:\oracle\product\10.2.0\admin\xxxxxx\bdump\xxxxxx_j000_6104.trc
    Tue Aug 04 05:05:00 2009
    ORACLE V10.2.0.3.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Release 10.2.0.3.0 - Production
    Windows Server 2003 Version V5.2 Service Pack 1
    CPU : 4 - type 586, 2 Physical Cores
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:1095M/4095M, Ph+PgF:7747M/12110M, VA:1367M/2047M
    Instance name: ebcd01
    Redo thread mounted by this instance: 1
    Oracle process number: 53
    Windows thread id: 6104, image: ORACLE.EXE (J000)
    *** ACTION NAME:(DEL_ARCH_EBCP01) 2009-08-04 05:05:00.191
    *** MODULE NAME:(DBMS_SCHEDULER) 2009-08-04 05:05:00.191
    *** SERVICE NAME:(SYS$USERS) 2009-08-04 05:05:00.191
    *** SESSION ID:(871.15642) 2009-08-04 05:05:00.191
    *** 2009-08-04 05:05:00.191
    ORA-12012: error on auto execute of job 130961
    ORA-27370: job slave failed to launch a job of type EXECUTABLE
    ORA-27300: OS system dependent operation:accessing execution agent failed with status: 109
    ORA-27301: OS failure message: The pipe has been ended.
    ORA-27302: failure occurred at: sjsec 9
    ORA-27303: additional information: The pipe has been ended.
    I'm not sure what job is causing this as there is no reference and also not sure how to resolve this issue!! How can I properly trace back these errors? Any ideas or tips to what should I do?
    I'm running 10.2.0.3 database on windows 2003 server.
    Thanks

    I found the problem.. the executable job was referring to a none existing batch file..
    I have refreshed the database from production some time ago and the jobs I have setup are referring to production scripts and paths (which we didnt have on dev)..
    This is now resolved.
    Thanks

Maybe you are looking for

  • Ipod shuffle isn't recognized by windows or mac

    I have an ipod shuffle and no computer will sees it when i plug it in. I have tried the 5Rs. i tried to restore it but when i open up ipod updater it says it is waiting for the ipod to become ready. I have left it plug in for 5 days so I am pretty su

  • Tables in SQL DEVELOPER DATA MODELER seem to be read only and have a chain symbol in the upper left

    I have a bunch of tables in my data model.  I have three relational models defined in this file.  In one of the models, all the tables seem to be read only.  They all have a chain in the upper left hand corner of their box. I am not using version con

  • HT1911 I forgot my password for iTunes.

    I asked to reset my password but unfortunately I no longer us  the email address associated with the account and of course the answer to the questions is invalid as well.  I have set up a new account, but is there anyway to recover and merge the old

  • Drop in profile speed.

    Hi There! I'm on the 40/10 BT product and most of the time my profile is around 38Mbps down and 10Mbps up. Over the past week I have checked my profile using the BT speed tested and have found that it has dropped down to 31Mbps and stays there. I hav

  • Portal Drive and Cluster

    Hi all, We received recommendation to start using portal drive instead of web browser in order to access KM folders via WebDAV. I have installed and configured Portal drive as described in SAP help. Since we have a cluster installation, the server UR