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.

Similar Messages

  • How to stop javascript alert popups from stealing tab focus?

    I have two gmail accounts, and usually a lot of tabs open. So sometimes I log into my other gmail account while a tab somewhere else still is logged in to my other. Sooner or later, the gmail with the old login session notices this, and makes a little alert() popup telling me I've been logged out, a couple minutes after I checked my emails on the other account.
    Now the problem is, that firefox because of this alert() popup instantly jumps to that tab, and I lose my place in my tab-jungle. This is very annoying. How do I prevent this inactive tab from stealing my focus/alert messages autofocusing tabs?

    Hello,
    Yes I know, but I don't want to do this. Is there any way to stop firefox from behaving this way?
    Thanks

  • How to verify JavaScript alert message display on page with C#?

    Hi All,
    I have a question about verify the JavaScript alert message on page. For example, I input the script in browser address like: "javascript:onmouseover=alert('popup windows')" . How to verify there's a alert message displayed on page with C#?
    Thanks

    Are you trying to use some automation or ? What the previous solution is they have put the text in the dom for you to pull out with C# or other languages.
    if you are trying to automate this through a browser maybe look into WebDriver
    WebDriverWait wait = new WebDriverWait(driver, 2);
    wait.until(ExpectedConditions.alertIsPresent());
    Alert alert = driver.switchTo().alert(); var alertText = alert.Text;
    alert.accept();

  • Urgent Help Please..How to show an alert in jsp if servlet has an exception

    Hi
    I am calling a servlet from popup jsp.
    When the values are submitted from the jsp I am calling the servlet where i have functionality to send an email. But if email fails in the servlet I have to return to the popupjsp and show an alert to the user.
    If any body knows please help.
    thanks in advance.

    Hi,
    Do like this :
    In the servlet's doPost() method, add codes in the manner
    mentioned below.
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
    PrintWriter out = response.getWriter();
    try{
    //throw new Exception();
    catch(Exception ex){
    out.println("<html><body>");
    out.println("<script language='javaScript'>");
    out.println("alert('Exception Occured Servlet...');</script>");
    out.println("</body></html>");
    Hope it helps.
    Regards,
    Sudhir

  • How to show a waiting popup until execution of command is done

    Hi,
    I am working with Jdev11g.
    I have a search text and button the result is in a popup window.
    Sometimes the serach takes a lot of time due to criteria entered.
    I want to be able to display a first popup with a message "executing ..." to notify the user that the query is running
    and then when wok is done show the result popup.
    Any hints
    Emile

    Hi,
    there also exists a native glasspane that you call from JavaScript
    function queueEvent(event)
    event.cancel(); // cancel action event
    var source = event.getSource();
    var params = {};
    var type = "customListener";
    var immediate = true;
    var isPartial = true;
    var customEvent = new AdfCustomEvent(source, type, params, immediate);
    customEvent.preventUserInput();
    customEvent.queue(isPartial);
    }You reference this from a clientListener on a button for the action event
    Frank

  • How to disable Security Alert popup each time for trusted site in IE on Win XP

    A user is using slow computer running with Windows XP SP3 and Java 7 update 45 version.
    When user open this site www.rocars.gov.hk in Internet Explorer 8, it will wait around 2 minutes to disaply security alert popup windows.  Then user needs to click Y to continue. Actually this website is trusted. How can I disable the security alert popup each time?
    I ever asked the technical support from www.rocars.gov.hk and they replied this issue is related to Java. So I ask here.

    918ee531-e393-4945-a46c-cd83c779af9a wrote:
    A user is using slow computer running with Windows XP SP3 and Java 7 update 45 version.
    When user open this site www.rocars.gov.hk in Internet Explorer 8, it will wait around 2 minutes to disaply security alert popup windows.  Then user needs to click Y to continue. Actually this website is trusted. How can I disable the security alert popup each time?
    I ever asked the technical support from www.rocars.gov.hk and they replied this issue is related to Java. So I ask here.
    what does problem have to do with Oracle DB?

  • How can I open a popup after clicking in a table cell using Web Dynpro?

    Hello,
    I am using Web Dynpro to create an application and I would like to click in a table cell and then a popup with confirmation appears.
    I already have a table with the information that is displayed in the browser. In fact, I just added a column with images that are print icons.
    My problem is that I don't know how to implement the method to set the action: when clicking on the print icon, a popup appears.
    Thank you very much in advance.

    HI Rafael,
    Please check the below sample code
      To quickly create dialog boxes of a standardized layout (for example, for the confirmation of changes to current data) you can call the CREATE_POPUP_TO_CONFIRM method of the IF_WD_WINDOW_MANAGER. You do not need to create a separate window for this. The dialog box is created automatically by the runtime.
    ●      The CREATE_POPUP_TO_CONFIRM method creates an object of the type IF_WD_WINDOW; the dialog box can be created using its parameters.
    method onactionpopup4_1 .
      data: l_cmp_api          type ref to if_wd_component,
            l_window_manager   type ref to if_wd_window_manager,
            l_popup            type ref to if_wd_window,
            l_text             type string_table,
            l_api              type ref to if_wd_view_controller.
      l_cmp_api        = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_cmp_api->get_window_manager( ).
      insert `Data where changed` into table l_text.    "#EC *
      insert `Do you want to save?`        into table l_text.    "#EC *
      l_popup = l_window_manager->create_popup_to_confirm(
                    text            = l_text
                    button_kind     = if_wd_window=>co_buttons_yesnocancel
                    message_type    = if_wd_window=>co_msg_type_question
                    window_title    = 'Test: Popup to confirm'
                    window_position = if_wd_window=>co_center )."#EC *
      l_api = wd_this->wd_get_api( ).
      l_popup->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_yes
                   action_name       = 'YES'
                   action_view       = l_api
                   is_default_button = abap_true ).
      l_popup->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_no
                   action_name       = 'NO'
                   action_view       = l_api
                   is_default_button = abap_false ).
      l_popup->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_cancel
                   action_name       = 'CANCEL'
                   action_view       = l_api
                   is_default_button = abap_false ).
      l_popup->open( ).
    endmethod.
    The SUBSCRIBE_TO_BUTTON_EVENT method of IF_WD_WINDOW assigns the actions to the appropriate buttons
    Thanks
    Vinay

  • How to convert javascript alert message into an Inline message in Apex Page

    Hi All. Im new to Apex.
    Present Approach -
    I have a dynamic report region developed using API's like APEX_ITEM etc. I am using java scripts to validate these dynamic items and popup alert messages as shown below -
    function ValidateNotObservedCB(p_row_num)
    var v_row_num = p_row_num;
    var v_not_observed_cb_status = document.getElementById('f_notobserved_'+v_row_num).checked;
    var v_not_in_district_cb_status = document.getElementById('f_notindistrict_'+v_row_num).checked;
    var v_program_code = document.getElementById("f_program_code_"+v_row_num).value;
    if ( (v_program_code.length>0)&& ( document.getElementById('f_notobserved_'+v_row_num).checked==true ))
         bold alert("You have already entered a program code.") bold
         document.getElementById('f_notobserved_'+v_row_num).checked=false ;
         document.getElementById('f_notobserved_'+v_row_num).value='N';
    } else if ( (v_program_code.length==0)&& ( document.getElementById('f_notobserved_'+v_row_num).checked==true )) {
         document.getElementById('f_notobserved_'+v_row_num).value='Y';
         document.getElementById('f_notobserved_'+v_row_num).checked=true ;
    } else
         document.getElementById('f_notobserved_'+v_row_num).checked=false ;
         document.getElementById('f_notindistrict_'+v_row_num).checked=false;
         document.getElementById('f_notindistrict_'+v_row_num).value='N';
         document.getElementById('f_notobserved_'+v_row_num).value='N';
    Question/Issue - How can I convert these alert messages into Inline messages to show on the page, similar to what appears when we do Item Validations in APEX.
    Waiting for responses as this is an urgent requirement.
    Thanks in Advance,
    Madhu

    Hi,
    I did with jQuery small sample
    http://apex.oracle.com/pls/otn/f?p=40323:36
    Page HTML header is
    <script type="text/javascript">
    $(function(){
      var lImg = $('<img alt="" class="pb" style="float: right;" src="/i/delete.gif"/>');
      var lMesg = $('<div id="MESSAGE" style="border-top: 1px solid rgb(142, 170, 142); border-bottom: 1px solid rgb(142, 170, 142); padding: 5px; background: rgb(235, 241, 235) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 450px;" class="t14notification"></div>');
      $('.pb').live('click',function(){
        $x_Remove("MESSAGE");
      $('#SUBMIT').click(function(){
        if($('#MESSAGE').length == 0){
          $('#t14Messages').children().append($(lMesg));
           $(lMesg).append($(lImg));
           $(lImg).after($('#P36_NOTIFICATION').val());
        }else{
           $('#MESSAGE').text('');
           $('#MESSAGE').append($(lImg));
           $(lImg).after($('#P36_NOTIFICATION').val());
    </script>I do not know does it help. Using this depend much on theme, defined class and IDs.
    Br, Jari

  • How to show an alert

    Hi:
    Apex 4.1
    I have a report that, when it runs, I want an alert to show if one of the report columns contains a specific value.
    Can anyone suggest how I might do this?
    Thanks.

    Scott:
    Brilliant idea! I changed the after region check to return <script>window.alert</script> javascript and it works great.
    Thanks!

  • How to show dynamically created popup from created command button?

    In my region I have a toolbar. The buttons in the toolbar are created dynamically in the bean. When one of the buttons is clicked I’d like to display a popup dialog.
    So, the code looks something like this:
    RichCommandToolbarButton button = new RichCommandToolbarButton();
    // set icons, text, etc….
    RichPopup popup = new RichPopup();
    // set id etc.
    RichDialog dialog = new RichDialog();
    dialog.setType(“cancel”);
    // add title, text, another button to toolbar, etc.
    popup.getChildren().add ( dialog);
    ClientListenerSet set = button.getClientListeners();
    if (set == null)
    set = new ClientListenerSet();
    button.setClientListeners(set);
    set.addFeatureDependency("AdfShowPopupBehavior");
    set.addBehavior("new AdfShowPopupBehavior('" + popup.getId() + "', AdfRichPopup.ALIGN_AFTER_END,null,'action')");
    button.setPopup(popup);
    In the corresponding .jsff the toolbar and the buttons are rendered in the following way:
    <af:toolbar id="t1" styleClass="AFStretchWidth"
    visible="#{backingBeanScope.MyBean.visible}" >
    <af:forEach items="#{backingBeanScope.MyBean.buttons}" var="adfButton" >
    <af:commandToolbarButton binding="#{adfButton}" />
    </af:forEach>
    This kind of works, except the button shows up with the down-arrow menu icon, which when clicked shows a tiny empty rectangle/menu. When the button itself is clicked, it correctly shows the popup with the dialog.
    So… how do I do this w/o doing the button.setPopup() so that I do not get the empty menu, but just get the popup to show when the button is clicked? Or is there a way to disable showing of the (empty) menu?
    I have tried adding the popup to the toolbar, but that did not work.
    I have tried adding action listener to the button, and adding the popup to the toolbar there and then showing it (by doing new RichPopup.PopupHints(); popup.show(ph)), but that did not work.
    I have tried adding action listener to the button, and adding the popup to the button getChildren().add() then showing it ((by doing new RichPopup.PopupHints(); popup.show(ph)), but that did not work.
    ANY help will be most appreciated!

    Hi,
    Do u mean to say that u need to open another PLD in when ur user form is open.?
    Please provide more information.
    Thanks,
    Vasu Natari.

  • Stop looping Javascript alert popup?

    I am learning javascript. In trying to learn code, sometimes I use the "alert" command to check and confirm the results I am looking for.
    Typically I do that from within Dreamweaver's live view. Once in a while, I inadvertantly create an "alert" message that loops continuously and I seem to be stuck not being able to close it unless I use task manager to shut down Dreamweaver.
    Is there a more gracefull way to terminate the looping alert message without having to terminate dreamweaver?

    Not really. This would require you to work with explicit return values and define a function that deals with the error messages on that basis rather than branching inside the actual code. Way to convoluted and impractical, as you would be adding lots of code just for that only to rip it out when done. For JavaScript development, use tools like Eclipse that can handle this within their debugging environment.
    Mylenium

  • How to stop an alert popup

    Once related to sorting my bookmarks, which does not happen as it did.
    An alert. TypeError: PlacesUtils.nodellsLivingmark
    Container is not a function
    Pops up constantly

    There is a updated version here with that part of the code commented out:
    *http://daniel-lange.com/archives/71-SyncPlaces,-SortPlaces-...-preserving-these-and-other-excellent-Firefox-add-ons.html

  • How to Show the Alerts inside the Form in JSP?

    Hello
    I am having parent form inside that thru one of the links,opening
    a small another JSP. Inside the small another JSP, i am validating
    the Screen and giving alerts. While Validating, the Alerts are coming
    outside the small another JSP and appearing in the Parent Big Page.
    I want the alert to appear in the small Another JSP. What to do?
    Thanks

    When you submit, the whole form is submitted. thats why you are getting alerts like that.
    you can use HTML frames to avoid these. but it is not possible to have frames inside a form. you have to have forms inside a frame. submit that particular frame's form so that only that part will be refreshed with messages/alerts.
    the otherway is paint the screen as it was earlier just change the inner jsp content. its seems you are getting only alerts cos the information is same.
    -sun

  • How come i get alert sounds at every action in iCal?

    I got a little problem with iCal. Everytime I am doing an action in iCal I get this "error" sound/alart sound.
    Actions like editing an event, moving an event, making a new event, etc. make that sound appear. I doesn't seem like this is doing something harmful to my events, but it's f*** annoying.
    How can I change it, am I doing something wrong?
    Can somebody help, please?

    No comments on this one, apparently.

  • How to show the new table record after creating

    I have a table form. After creating a new record to the table, the page go back to the same page. I wanta know how to show the new record after click 'Create' button. Right now, all the items will be cleared.
    Thanks.

    The button submits the page so just create a branch that directs to a new page (which you'll have to create if you have not already done so) after submission which directs to a new page and uses the newly generate PK to display the row you've generated. You'll need to make the branch conditional on that press of the Create button.
    Phil

Maybe you are looking for

  • Budget validity error wen re-ordering PO- PO is error in process

    Hi all, SRM 5.0 ECS. I am facing few issues related budget check in PO . I tried adding a new line item in PO  to do a PO increase,the PO goes in error in process.When I see RZ20,the alert details show the following message: BUDGET VALIDITY FOR DATE

  • Different icons for each TreeNode...?

    Is it possible to make each (or at least some) of the TreeNode's in a JTree display different icons? H

  • Where is adobe tech support?

    Where is adobe tech support?

  • Reseting my flash game to begining

    Hi I have a drag and drop game using a couple external ActionScript files My game works and all..check there answers and correct ones go into place if they missed some Now at the end I want a reset button...My movie is all in one key frame and all sc

  • Iphone app update via itunes

    Hi, I have synced my Iphone with my new macbook pro, now when I try to update the Iphone apps through itunes on Mac, it gives me message that all apps for this apple id are updated, whereas I am using the same apple id on my Iphone and Macbook. Cant