How to open popup windows in response to an event in view model

Hi All,
I'm developing a Windows store app using XAML+C#, following MVVM framework.
I have  a login form which taked userid and password and logs into a database. If the login failed, i need to open an exception popup on the same login screen.Let's say login screen's name is homepage.xaml and the view model which contains all the login
work flow is loginviewmodel.
Now, if connection to the database fails a message will be sent by the connection service. I need to raise a popup in the view based on the message i see in the viewmodel.
Any help/pointers are greatly appreciated.
Thanks in advance,
Chandra

In MVVM LIght 5 there is a dialogService you can use for this
http://marcominerva.wordpress.com/2014/10/14/dialogservice-in-mvvm-light-v5/

Similar Messages

  • URGENT PLEASE ---How to open popup window after selecting a cell of JTable.

    Hi,
    I am struck at aproblem, I am developing an applet in which I am using TabbedPanes and each tabbed panel has either tables or some key information to display.
    My Problem is, I have a JTable, which has informations related to a perticular record, each record may or may not have some more hidden information. If a record has a hidden information, then the record's cell will contain a message " click here for more information " . after clicking this cell a window will open to show the hidden information.
    I have tried ListSelectionListener and MouseListener to the JTable but nothing is giving me the desired results.
    Please I you could suggest me about this.

    You say its urgent
    So urgent, so oh oh urgent
    Just wait and see
    How urgent my love can be
    Its urgent

  • How to create a button to get File Open popup window and select a file

    Hi,
    I have an applet that contains Browse button. When user clicks on that, a File Open popup window should be displayed to enable user to select the input file. This file path should be given back as parameter.
    How to do this? I have tried using LoadFileData but not able to get the desired result.
    Any pointers would be helpful.
    Thanks,
    Lalitha Dandibotla

    Do you need only the path or also the file back into Siebel?
    If you need both, the have a look at any attachment applet, that will give you a good start.
    Are you using Siebel in High Interactivity (HI) Mode or Standard Interactivity (SI) Mode?
    If you are in SI Mode have a look at the html type
    <input type="file">
    http://www.w3.org/TR/html401/interact/forms.html#h-17.4
    Axel

  • How to open new window when i press submit button/submit button.

    Hi,
    When i press a button, I need to capture an item value in current from and I need to pass that value to another form. The child form should open in the new form.
    For that Iam using the java script, But when i use the java script my page is not able to re-size, scroll bars address bar and menu bars are missing. if any one did this kind of requirment please share with me how to solve this issue.
    Thanks

    Re: How to show Popup window in OAF on click of a button
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • How to show Popup window in OAF on click of a button

    How to show Popup window in OAF on click of a button (Without using Javascript)
    1. I have one OAF page on which i should have button Called "Next"
    2. On clicking of this button a new window/page should be displayed with the image stored in database. on clicking on this "Next" button again next image from the database should be displayed on the newly opened window/page.
    3. Is it possible to configure OAF to render window_II in the opposite screen of window_I where the OAF client resides? (If the OAF-client resides in screen_I render window with image in screen_II). That is, at the first click on the Next-button, window_II appers on screen_II and not some random location. The user will have 2 screen/monitors on his work place.
    4. Given that the two windows reside on each screen, is it possible to make OAF remember the position of window_II ? The goal of this is to force the window to pop up on the same location on the same screen next time the Next-button is pressed.
    5. If window_II is closed (eg. by using X) and the Next-button in window_I is pressed again, will window_II pop up in the same location and screen as previously ?
    6. Is it possible to have a Print-button in window_I what prints the scanned picture in window_II ? Is it possible to have the click on this Print-button to open the standard print dialog on top of window_II ? Could the button be placed in window_II as well, having the same functionality ?

    I have tried to open home page window. You can change the URL according to your requirement.
    import oracle.apps.fnd.framework.webui.OAUrl;
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE"; // Calling Oracle Home Page
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    Above code will open the new page in new window.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error: Open popup window failed

    Hi,
    I'm opening a web page in an StageWebView and by trying to click a link that should open a window, I receive this error:
    [StageWebView] Error: Open popup window failed
    This is the link "Invite your friends" at Google:
    https://developers.google.com/+/web/share/interactive#myBtn
    How to fix that? I hope anybody got an idea!

    This is a javascript/html question, and has nothing to do with Java/JSP.
    You could do it with plain javascript/html using window.opener.
    I would recommend using something like a [YUI 2 Panel|http://developer.yahoo.com/yui/container/panel/] to do it.
    Opening new windows is a thing of the past.

  • Open popup window and redirect user to home page in sandboxed solution

    i've created a sandboxed solution visual webpart and it has submit button so when user fills the information in the text boxes availble in webpart and clicks submit button so I want to open popup button containg success message and ok button so when user
    clicks ok button in popup window i want user to be redirected to the home page of the site.
    i tried to open popup and showed success message by below code
     string gotohomepage = "http://sp2013:1111/Pages/home.aspx";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Your Record has been submitted successfully,you will be redirected to home Page shortly');location.href =
    '" + gotohomepage + "';", true);
    but it's not opening popup window can anyone help how do i open popup window and redirect user to home page in sandboxed solution

    Page class and script manager are not supported in sandbox solution
    You can create model popup to achieve this
    below are the reference links
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx
    http://social.msdn.microsoft.com/Forums/en-US/9427db4d-60f2-4b2a-8db6-b50d01ac4f23/how-to-create-modal-popup-using-sandboxed-solution

  • Open popup window and bring text to opener window jsp [help~]

    how to click a button then open popup window.
    and add somthing in the popup window, that can bring the text in the popup window to opener window in jsp.

    This is a javascript/html question, and has nothing to do with Java/JSP.
    You could do it with plain javascript/html using window.opener.
    I would recommend using something like a [YUI 2 Panel|http://developer.yahoo.com/yui/container/panel/] to do it.
    Opening new windows is a thing of the past.

  • How to open new window and generate oracle report from apex

    Hi,
    I had created an application that generates PDF files using Oracle Reports, following this Guide.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    And I followed 'Advanced Technique', so that users can't generate PDF file by changing URL and parameters. This is done for security reasons.
    But in this tutorial, when 'Go' button is pressed, the PDF file is displayed on the same window of apex application. If so, user might close the window by mistake. In order to avoid this, another window have to be opened.
    So, I put this code in the BRANCH - URL Target. (Note that this is not in Optional URL Redirect in the button property, but the branch which is called by the button.)
    javascript:popupURL('&REPORTS_URL.quotation&P2100_REP_JOB_ID.')
    But if the button is pressed, I get this error.
    ERR-1777: Page 2100 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    If I put the code 'javascritpt ....' in the Optional URL Redirect, another window opens successfully, but the Process to generate report job is not executed.
    Does anyone know how to open new window from the Branch in this case?

    G'day Shohei,
    Try putting your javascript into your plsql process using the htp.p(); procedure.
    For example, something along these lines should do it:
    BEGIN
    -- Your other process code goes here...
    htp.p('<script type="javascript/text">');
    htp.p('popupURL("&REPORTS_URL.quotation&P2100_REP_JOB_ID.")');
    htp.p('</script>');
    END;
    What happens is the javascript is browser based whereas your plsql process is server based and so if you put the javascript into your button item Optional URL Redirect it is executed prior to getting to the page plsql process and therefore it will never execute the process. When you have it in your branch which normally follows the processes, control has been handed to the server and the javascript cannot be executed and so your page throws the error "Page 2100 provided no page to branch to"... By "seeding" the plsql process with the embedded javascript in the htp.p() procedure you can achieve the desired result. You could also have it as a separate process also as long as it is sequenced correctly to follow your other process.
    HTH
    Cheers,
    Mike

  • How to open a window in full screen mode using lf_fpm_navigation?

    Hi Guys
    For the following applications
    ESS Application: HAP_START_PAGE_POWL_UI_ESS
    MSS Application: HAP_START_PAGE_POWL_UI_MSS
    When the user clicks on the appraisal document name, a seperate window(not full screen) is generated to display the Appraisal docuemnt.
    The code is as follows:
    COMP: HAP_START_PAGE_POWL_UI
    Object : COMPONENTCONTROLLER
    Method: FOLLOWUP_POWL
    Generate the URL to be called.
        CALL METHOD cl_wd_utilities=>construct_wd_url
          EXPORTING
            application_name = 'HAP_MAIN_DOCUMENT'
            in_parameters    = lt_parameters
          IMPORTING
            out_local_url    = l_url.
        wd_this->url = l_url.
        wd_this->display_document( ).
    In Method: DISPLAY_DOCUMENT
    lv_alias = 'EMPLOYEE_DOCUMENT_UI_OBN'.
    use FPM navigation
        ls_nav_key-key1 = 'HAP'.
        ls_nav_key-key2 = 'HAP_GENERIC_UI'.
        lr_fpm_navigation ?= lr_fpm->get_navigation( is_key = ls_nav_key iv_instance_sharing = abap_false ).
        CALL METHOD lr_fpm_navigation->get_key_from_alias
          EXPORTING
            iv_alias = lv_alias
          RECEIVING
            rv_key   = lv_key.
        lr_fpm_navigation->modify_parameters(
             EXPORTING
               id_target_key            = lv_key
               it_application_parameter = lt_appl_param
               it_business_parameter    = lt_business_param    ).
        lr_fpm_navigation->navigate( lv_key ).
    Any idea how to open this window in full screen?
    Highly appreciate your help.
    Thank and Regards
    Pramod

    Hi Pramod,
    This FPM navigation is achieved using settings made in Launchapd Customizing ( LPD_CUST ).
    a) Execute Tran LPD_CUST
    b) Go to Role HAP - Double Click to open it.
    c) Open the second folder on the LHS menu - there you will find 2 entries
    d) Click on second entry - in the entry setting you can see that it is configured for WD Application  - HAP_MAIN_DOCUMENT
    e) Click on button Show Advanced Parameters
    f) There you will find a input box named as Window Features - here you can specify window features like
    height=700,width=1100,position=center,menu=no,status=no,location=no,menubar=no,status=no,toolbar=no
    save the settings come out and test ur app again.
    change the height and width and other features as per ur req.
    Regards
    Manas Dua

  • How to open (popup) a windows folder from a page?

    Hi,
    I´m building an application using Oracle Application Express (version 4.2). I need to open a windows folder (popup) using a button located wihtin a region (Region Type: HTML) . The configuration I used for the button item is:
    Name:
    Application: 109SCSG_oficial_Fll
    Page: 11 Ficha- Modificar Ficha
    Name: P11_OPEN_XPLORER
    Text Label/Alt: Abrir
    Attributes:
    Attributes: Image
    Image: mfopen.gif (it is an picture of a little folder)
    Attributtes: onClick="openFolder('P11_XPLORER');" (where P11_XPLORER is a text field filled from a oracle table with the folder´s path, e.g C:\3219)
    Action when Button is clicked:
    Action: Submit Page
    Excetute Validations: No
    Button Request: openFolder('C:\3219');
    It is not opening any windows folder. I appreciate any information regards how to configure a button item in order to do this.
    Regards,
    Luis

    This is illegal with in the realm of Web Pages.
    The most you can hope for is putting up a "File Browse.." item type.
    Now, if the files were placed where the Oracle Server can access it....
    (please remember:  Servers are not allowed to 'access' client machines.)

  • How to stop popup window using phone layout for display - Responsive HTML5, RH11

    Hello,
    I'm using the new Responsive HTML5 output in RH11. For some of my hyperlinks, I want to use a pop-up to display the linked topic. In the output, the pop-ups work, but they are automatically displayed using the phone layout, with the associated navigation buttons at the bottom, the help title, and so on. I don't want this - I just want a plain popup window. So, I tried to add a Screen Profile, set to 400 x 500 pixels exactly (thinking that this is bigger than a phone, but smaller than a tablet). I also added a corresponding Screen Layout. In the popup properties, I set the popup size to be 400 x 500 pixels. I guess there is something else I need to do to get this to work... but I don't know what that is. (I tried creating a new Window on the Project Set-up tab, and I tried creating a different master page. These things didn't work.)
    Can anyone tell me if what I'm trying to do with these popups is just a bad idea and it won't work well with certain browsers?
    Thanks!
    Alexandra

    I am confused as the responsive layouts are one size fits all, that is the point of them. You have one layout that morphs according to window size.
    Screen Profiles are only used within Multiscreen HTML5 layouts where you can map screen profiles to different adaptive screen layouts, such as desktop, tablet and phone. That mapping does not apply to responsive layouts.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to create popup Windows in WebDynpro

    I am learning WebDynpro and have developed a sample application where i ask the user to login. In case of incorrect login I want to display a popup window which shows an error message and has an ok button on it. On click of the OK button i want to close the Window.
    I have created a view for this popup... called errorView
    On click of login button i perform validations n incase the validatins fail i have put in the following code
    IWDWindowInfo myWinInfo = wdComponentAPI.getComponentInfo().findInWindows("Ra_ErrorView");
    myPopupWindow = wdComponentAPI.getWindowManager().createWindow(myWinInfo,true);
    myPopupWindow.setWindowPosition(300,150);
    myPopupWindow.open();     
    How should i proceed?
    Where should i write the myPopupWindow.close()
    Kindly give a step-by-step solution.

    Hi Reema,
    You want to close a window say window1 which you opened from a view.
    create an attribute. select its type from java native settings to IWDWindow
    wdContext.currentcontextElement().setWindowInstance(window);
    1.create an event in component controller say event1
    2.In order to trigger the event in component controller create a method in it
    write this code in implementation of controller to trigger the event
    wdThis.wdFireEventAddressSelectedEvent();
    3.For catching whatever event that is responsible for closing the window create an event handler in view1 say eventhandler1.Choose the subscibed event to be event1
    4.In that eventhandler1 write the code in implementation
    IWDWindow window =
    wdContext.currentcontextElement().getWindowInstance();
    window.close();
    Hope this helps you.Do revert back if you have more doubts
    Regards
    Rohit
    Message was edited by: Rohit Radhakrishnan

  • Open popup window from non graphic window

    Hi All,
    i'm trying to open a popupwindow of one of my classes, but i
    have no parent reference in the current class that i'm working
    with, how can i refer to the main application window?

    If you have a model for your application state, use this:
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    applicationComplete="this.onApplicationComplete()">
    <mx:Script>
    <![CDATA[
    private function onApplicationComplete():void
    // Component map
    this.model.map["app"] = this;
    ]]>
    </mx:Script>
    </mx:Application>
    You will be able to refer to this.model.map["app"] as the
    parent of your popup window from anywhere in the application.

  • Session lost (IE5 & IE6) when opening popup window.

    Ok, I've been struggling with this problems for days and spent countless hours with google without finding any decent solutions.
    I'm building a ecommerce site and if the user want to see additional information + pictures from a product, he/she can open a popup window that also has "add to cart"-submit field.
    UserID and some other necessary data is kept in sessions but IE5 / IE6 seems to loose these in this new window when opening it via javascript (popup).
    If I have understood right, the session is lost because IE considers the new window as a new task and therefore it is out of the "session scope".
    Ok, one might say that using encodeUrl()-method should fix this problem, but no it doesn't. encodeURL()-method writes the session to URL only when user has disabled the cookies and in my situation it's not the case.
    Has anyone here been struggling with the problem above ? I've been considering if I encode the UserID and other information manually to the URL and decode it back in the popup, but that brings n+1 security issues to my mind and doesn't really sound like a decent solution.
    Thanks in advance,
    - Roni
    p.s: Sorry about my crappy english.

    Hmm,
    I did a small test and managed to get the sessions to work with IE.
    the main page:
    <%@ page language="java" %>
    <%
    session.setAttribute("foo", "bar");
    %>
    <html><head><title>sessiontest</title>
    <script language="javascript" type="text/javascript">
    <!--
    function popUp(URL) {
    options="toolbar=no,directories=no,location=no,status=no," + "menubar=no,scrollbars=yes,resizable=yes,width=416,height=465, left = 362,top = 184";
    var Infowindow=window.open(URL, "Infowindow" ,options);
    Infowindow.focus();
    -->
    </script>
    </head>
    <body>
    sessionattribute <b>foo</b> has value <b>bar</b><p>
    <a href="javascript:popUp('<%= response.encodeURL("sessiondebugpopup.jsp") %>')">link to popup</a>
    </body>
    </html>popup:
    <%@ page language="java" %>
    <html><head><title>sessiontestpopup</title>
    </script>
    </head>
    <body>
    attribute value is:<p>
    <b><%= (String)session.getAttribute("foo") %>
    </body>
    </html>This works just fine, but the code in the actual application does not differ from this.
    Only difference I can figure out if that the .js popup() function is located in header.jsp and the call to the popup is in other .jsp that includes the header.
    Here's the call to the popup in the application:
    <a href="javascript:popUp('<%= response.encodeURL("pop.jsp?prod="+ rs2.getString("tuo_tuonro") +"&img="+ cnt.getPictureURL(rs2.getString("tuo_tuonro"), cnt.getUserId(user)))%>')">link</a>And the above code works just fine with firefox/opera/etc, but not with IE5/IE6 (haven't tried other IE versions though).
    This is really getting annoying.

Maybe you are looking for