How to shoe FacesMessage as modal

Hi Adf Experts,
I have a requirement like,I want to display FacesMessage as modal on my page.
I am using below code
String messageText="A prgramatic af:message";
FacesMessage fm = new FacesMessage(messageText);
fm.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(null, fm);
Using above code will show message but user can access below screen which I don't want
Please help

This don't work. The faces massage is not model. You can try to use our own dialog which you show as model.
Timo

Similar Messages

  • How can i close a modal window?

    Hi, everybody
    My question is in the subject, but i4ll repeat it again.
    How can i close a modal window in forms?. I4ve tried with hide_window but it doesnt closed itself.
    Please help me one again.
    Thanks.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JAMIE MCPHIE ([email protected]):
    There is a bug with Oracle Forms where you can not use the close button "X" on the window title bar. You need to create a button on the window that will close the form.<HR></BLOCKQUOTE>
    Jamie
    You are right in the fact of the programmer must make a exit mechanism. However, this is not a bug, this feature is related to the management of this windows type (modal). Bye
    null

  • How to customize URL in modal dialog script?

    Hi All,
    I am using JSLink to open Modal dialog, want to customize the url by adding '&DefaultView=Email' to URL in script. How to do this in below script:
    (function () {
    // Create object that have the context information about the field that we want to change it output render
    var pictureFiledContext = {};
    pictureFiledContext.Templates = {};
    pictureFiledContext.Templates.Fields = {
    //"Picture" is the column name.
    "Picture": { "View": pictureFiledTemplate }
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(pictureFiledContext);
    function pictureFiledTemplate(ctx) {
    var url= ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
    var itemID=ctx.CurrentItem.ID;
    var itemTitle=ctx.CurrentItem.Title;
    return "<img alt='"+url+"' src='"+url+"' complete='complete' onclick=\"openModalDialog('EditForm.aspx?ID="+itemID+"','"+itemTitle+"')\" />";
    function openModalDialog(url,title)
    var options = {
    title: "Item-"+title,
    width: 600,
    height: 600,
    url: url
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
    Thanks in advance!

    You should be able to do it like this:
    function openModalDialog(url,title)
    var options = {
    title: "Item-"+title,
    width: 600,
    height: 600,
    url: url + "&DefaultView=Email"
    Brandon Atkinson
    Blog: http://brandonatkinson.blogspot.com

  • How to get rid of modal ads

    More and more often I get this blac opac modal screen when visiting newssites etc. Like this: http://www.youtube.com/watch?v=rAo-xsfJ4u8&feature=youtu.be
    What causes this and how do I get rid of it?

    From the Safari menu bar, select
    Safari ▹ Preferences ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then uninstall them one or a few at a time until you find the culprit.

  • How to break execution when Modal SubVI opened?

    Colleagues,
    A very simple question: sometimes I have modal dialogs, which cannot be closed (this may happened during programming, when logic not completed, or if one of then modal dialogs was opened, and then main VI was started). So, when it happened, then the only way to break execution is killing LabVIEW from Task Manager. I remember that was a simple trick how to stop execution without killing LabVIEW, but can't remember. Can you please give me a hint - how to stop execution in such situation? Yes, I know about Ctrl+. combination, but this doesn't work in this case.
    See attachment for details.
    Andrey.
    Solved!
    Go to Solution.
    Attachments:
    Modal SubVI.zip ‏8 KB

    Try pressing "Ctrl + ." (period) to stop the VI.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How to create a sophisticated modal interface returning a value?

    Hi,
    I am trying to create an interface in Java with sophisticated features to allow a user to select a date value. It has to be modal, that is, when the user clicks on a button, the frame opens, the user selects a value and the value must be retrieved by the calling frame.
    JDialog is not OK, because it does not allow to design a sophisticated interface. The customization possibilities of JDialog are not enough for my needs. I need to design a full screen with several tables, combox boxes, etc...
    How should I proceed? What type of object should I use / inherit of? What mechanism should I use to retrieve the value selected by the user? I can see (in http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html) that JOptionPane allows to retrieve a value from a modal box. That is exactly what I need, but for a much more sophisticated interface.
    Any ideas? Thanks !

    I had a serious look at the source of JDialog once,
    with a view to doing my own modal stuff. Too much
    like hard work.It's really not that hard, as long as you realize that calling setVisible(true) on a modal dialog suspends the current event pump and starts a new one. Once the dialog is set invisible or disposed, the original pump resumes.
    So, assuming that you've created a class to manage the dialog, you'd implement a show() method like the following (hasn't been compiled, may contain syntax errors):
    // note: this class is responsible for building and displaying
    //       a dialog; it doesn't need to inherit from JDialog, and
    //       becomes a lot cleaner if you don't inherit
    public class MyDialogManager
        private JDialog _myDialog;
        private JTextField _field;
        public MyDialogManager(JFrame owner, String title)
            _myDialog = new JDialog(owner, true, title);
            // build out the dialog here, including text field
        public String showMyDialog()
            _myDialog.setVisible(true);
            // this thread is suspended until the dialog is closed
            return _field.getText();
    }

  • How to make a frame modal?

    Hei guyz,
    I'm trying to call a frame from another frame (which should basically act like a dialog, but is not a dialog), how can i make this 'child' frame modal, i.e. once im done with the 'child' frame, the focus has to go back to the 'parent' frame and no other component could be opened while a user is working on the 'child' frame.
    Can anyone let me know, how this is possible and is there any other better approach (other than making the child frame, a dialog)?
    Thanks in advance.

    and is there any other better approach How can we suggest a better approach when we don't know why you rejected a modal dialog.
    Based on your requirement:
    once im done with the 'child' frame, the focus has to go back to the 'parent' frame and no other component could be opened while a user is working on the 'child' frame.
    it would appear to me that using an modal dialog is the obvious choice.
    Otherwise I suggest you search the forum. Keywords like "modal jframe" would be a good place to start.

  • How do I create a Modal JDialog (non-bypassable when visible)?

    After customising a JDialog, I found that it is basically ignored after it has been created, by the main program. I've tried many ways to stop this from happening, searched the Java tutorial and googled it, but cannot find out how to do so. I have used the constructor for a modal Dialog:
    JDialog(Dialog owner, String title, boolean modal)However, my methods are still treated like a non-modal Dialog, as they are ignored. Is there a certain method I have to call to make this Dialog modal (not able to be bypassed when made visible). If so then I would appreciate it if anybody could help, or perhaps point me along the right way.

    JDialog(Dialog owner, String title, boolean modal)How do you expect us to solve your problem based on a single line of code? Create a simple demo program that shows the problem
    Here is a simple demo that works.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class DialogModal extends JFrame implements ActionListener
         public DialogModal()
              JButton button = new JButton("Show Dialog");
              button.addActionListener( this );
              getContentPane().add( button );
         public void actionPerformed(ActionEvent e)
              JDialog dialog = new JDialog(this, "Modal Test", true);
              dialog.setSize(300, 300);
              dialog.show();
         public static void main(String[] args)
              JFrame frame = new DialogModal();
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • How to make a addChild modal ?

    Hello !!!
    I have a variable:
    var window=TitleWindow;
    and I'm doing:
    this.addChild(window);
    but needs to be modal. But, how?
    Thanks...
    Gilberto

    Martin ??
    Thanks very much for your reply.
    But I can not use because the addChild PopUpManager.addPopUp performs an effect ...
    Gilberto

  • How does EventQueue work with modal dialogs?

    Can anybody point me to some documentation/article/book etc. which thoroughly explains how exactly the EventQueue and EventThread work when a modal dialog is being opened? I assume dispatchEvent() for the event that opens a modal dialog does not return until the modal dialog is closed. If so, how are events handled while a modal dialog is open?
    I can't seem to find any book that goes into detail of these Swing/AWT internals.
    Thanks,
    -Martin Roth
    [email protected]

    The short answer is that a second event pump is created while the modal dialog is visible. The original event pump (which is different than an event thread) is indeed blocked until the dialog is closed. The code creating the new pump is in the java.awt.Dialog::show () method.
    The event pump is part of the java.awt.EventDispatchThread class.

  • How do you open a modal window from an Edge Animate button?

    I am trying to create an animated group of buttons that open a Bootstrap 3 modal window when clicked. The animation (OAM file) is placed on the Bootstrap page.
    This code is added to Animate "CREATION COMPLETE" for button creation and button click:
    // Button 1
    var btn1 = sym.createChildSymbol("HomeButton", "menu");
       // Convert/store a reference to the symbol as a string representing the element name of the symbol instance.
    var btn1_e = btn1.getSymbolElementNode();
       // Now can use that element string and convert it to a DOM element to use with jQuery to call its css properties
       // and adjust whatever you'd like, including its position property   
       sym.$(btn1_e).css({"position":"relative", "margin":"10"});
    btn1.getVariable("setLabel")("Print Work");
    btn1.getVariable("setDescription")("Examples of Telex advertisement");
    btn1.$("MyImageBox").css("background" , "url(images/telexads_full269x151.jpg) no-repeat");
    btn1.getSymbolElement().click(function() {
              console.log("button 1 was clicked");
    document.getElementById("myModal");
    $('#myModal').modal('show');
    The div for the modal is on the main HTML page. I want to have the modal open a larger image of the button. Basically a lightbox for the Edge Animate stage, but it has to access the div on the parent HTML document (not the EdgeAnimate.html).
    Here is the error from the Chrome Javascript console:
    Uncaught TypeError: Object [object Object] has no method 'modal' portfolioButtonStage_edgeActions.js:4
    (anonymous function)portfolioButtonStage_edgeActions.js:4
    f.event.dispatchjquery-1.7.1.min.js:3
    h.handle.i
    I've tried Edge Commons Spotlight, but that doesn't open on the page correctly; it puts the image at the bottom of the main page.
    Any ideas? Thanks

    I am trying to create an animated group of buttons that open a Bootstrap 3 modal window when clicked. The animation (OAM file) is placed on the Bootstrap page.
    This code is added to Animate "CREATION COMPLETE" for button creation and button click:
    // Button 1
    var btn1 = sym.createChildSymbol("HomeButton", "menu");
       // Convert/store a reference to the symbol as a string representing the element name of the symbol instance.
    var btn1_e = btn1.getSymbolElementNode();
       // Now can use that element string and convert it to a DOM element to use with jQuery to call its css properties
       // and adjust whatever you'd like, including its position property   
       sym.$(btn1_e).css({"position":"relative", "margin":"10"});
    btn1.getVariable("setLabel")("Print Work");
    btn1.getVariable("setDescription")("Examples of Telex advertisement");
    btn1.$("MyImageBox").css("background" , "url(images/telexads_full269x151.jpg) no-repeat");
    btn1.getSymbolElement().click(function() {
              console.log("button 1 was clicked");
    document.getElementById("myModal");
    $('#myModal').modal('show');
    The div for the modal is on the main HTML page. I want to have the modal open a larger image of the button. Basically a lightbox for the Edge Animate stage, but it has to access the div on the parent HTML document (not the EdgeAnimate.html).
    Here is the error from the Chrome Javascript console:
    Uncaught TypeError: Object [object Object] has no method 'modal' portfolioButtonStage_edgeActions.js:4
    (anonymous function)portfolioButtonStage_edgeActions.js:4
    f.event.dispatchjquery-1.7.1.min.js:3
    h.handle.i
    I've tried Edge Commons Spotlight, but that doesn't open on the page correctly; it puts the image at the bottom of the main page.
    Any ideas? Thanks

  • How to sho waveforms at thumbnails?

    How can I show the waveform preview at each clip's thumbnail in the project browser (CS6)? I saw the waveforms in a tutorial, so they can be enabled somehow but I don't know how.
    Thank you.

    Please have a look at the screenshot I took from the tutorial (https://vimeo.com/28888756). There are waveforms below the thumbnails.

  • How to pop up a Modal dialog on the top.

    Hi ALL,
    I want to pop up a dialog from background thread, and make it on the top level, any suggestion please.
    First: JFrame.show(), and then start a background thread to monitor some event.
    when the event happen, it will start to pop up a warning message, the user has to response to it.
    otherwise user can not do anything, however the background is still running.
    I want to use JOptionPanel, but it seem does not work good.
       _timer = new Timer(30*1000, new ClockListener());
      class ClockListener implements ActionListener {
            public void actionPerformed(ActionEvent e) {
                    if(event)
                      popUpDialog();
    .........Thanks in advanced!

    Use a SwingWorker. Do the backgrround monitoring in a while(true) loop (with a Thread.sleep) in doInBackground. Invoke process when your event is detected and show the dialog from publish.
    db

  • How to create a modal window....?

    Hi All,
                      i have created a  WDA ALV Report,and for one of the field i assigned a cell editor 'Button"
    Whenever i click on that button( which was in the ALV grid) i need to display some other data in the modal window...
    1.How can we create a modal window...& where exactly i need to write the code ?
    Please help me to sort out this...
    Regards,
    Ravi

    Hi Ravi,
    1) Go to the methods tab of the view containing your ALV & create an event handler method for event ON_CLICK of ALV. This method would be called by the system whenever you click the button within your ALV cells.
    2) For this create a new view say POPUP_VIEW & a new window say POPUP_WINDOW.
    3) Now embed your POPUP_VIEW within your POPUP_WINDOW.
    4) Now within the view which displays your ALV, go to the event handler method for ON_CLICK & call the popup window.
    This can be done by making use of the code wizard. Just start the wizard and select the "Generate Popup" radio button. When you do an F4 help within your component use you would now be able to see an entry with the name of your new window that you have created i.e, POPUP_WINDOW. Just select that entry and press on enter. That's it you have done the needful for achieving your desired functionality.
    Regards,
    Uday
    Am just pasting you the code from my event handler mthod for ON_CLICK event:
    METHOD call_popup .
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window(
                         window_name            = 'POPUP_WINDOW'
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                         button_kind            = if_wd_window=>co_buttons_ok
                         message_type           = if_wd_window=>co_msg_type_none
                         default_button         = if_wd_window=>co_button_ok
      lo_window->open( ).
    ENDMETHOD.

  • How to utilize JQuery modal region template in theme 24

    Hi guys,
    I was check the templates of the theme of 24, and noticed "JQuery modal region template". Can you pls, give some pointers about how to use it ...
    Regards,
    Fateh

    Hi,
    I want to create a modal page and would also like to know how to use the jquery modal region template.
    Any help appreciated.
    Thanks,
    DS

Maybe you are looking for