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

Similar Messages

  • How can i open the popup from java class

    Hi,
    Please tell me how can i open the popup from java class.
    I am using jdev 11.1.1.7.0
    I have used the below code which works fine in jdev 2.1 but it will have some errors in 11.1.1.7.0.
    Please tell me some way to do this in all jdev versions.
    Bean obj = (Bean)RequestContext.getCurrentInstance.getExternalContext.getPageFlowScope(“obj”);
    Code for hide pop-up
    FacesContext context = FacesContext.getCurrentInstance();
    String popupId = obj.getPopUpBind().getClientId()
    ExtendedRenderKitService service = Service.getRenderKitService(FacesContext.getCurrentInstance(),
    ExtendedRenderKitService.class);
    String hidePopup = "var popupObj=AdfPage.PAGE.findComponent('" + popupId +
    "'); popupObj.hide();";
    service.addScript(FacesContext.getCurrentInstance(), hidePopup);
    Code to Show pop-up
    StringBuffer showPopup = new StringBuffer();
    showPopup.append("var hints = new Object();");
    showPopup.append("var popupObj=AdfPage.PAGE.findComponent('" +
    obj.getPopUpBind().getClientId() + "');popupObj.show(hints);");
    service.addScript(FacesContext.getCurrentInstance(), showPopup.toString());
    Code need to be added in jsff pop tag
    binding="#{pageFlowScope.bean.popUpBind}
    Variable need to be added in Bean.java
    private RichPopup popUpBind;

    Hari,
    Since you're using a non-public build of JDeveloper, you should be using a non-public forum.
    John

  • After update I am no longer able to open email attachments by just clicking on the attachment. I now have to click control and then click open linked file. How can I open attachments by simply clicking on them?

    After update I am no longer able to open email attachments by just clicking on the attachment. I now have to click control and then click open linked file. How can I open attachments by simply clicking on them?

    Unless you believe middle-click is yours and don't like it being usurped, mine is set globally to "Enter".

  • How can I regain answers feature alt + click for spelling and definition. using windows 7 and 6.0.2

    How can I regain answers feature alt + click for spelling and definition. using windows 7 and 6.0.2
    I may have lost that feature when I upgraded to 6.0.2
    This feature allowed me to rest the mouse over any word, anywhere, press Alt then left clk mouse and it gave spelling and definition of the word.

    This did not help.
    I already had Answers installed, however, I followed your procedure anyway but it did not give me back the capability:
    How can I regain answers feature alt + click for spelling and definition. using windows 7 and 6.0.2
    By the way, when I left click, there is a low level, short gong that sounds.

  • How can I open the browser on clicking a item in my JMenu

    How can I open the IE with a webpage on clicking a item in my "Help" context menu in my application.
    *. I have a Help menu with different help topics
    *. In one of the item of the menu I want to provide a URL link which should open in the Default browser (IE/ Mozilla)
    Any solution would be appreciated.
    Thanks

    try these:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=718184
    http://www.croftsoft.com/library/tutorials/browser/
    Message was edited by:
    dberansky

  • How can I start a new paragraph within the same table cell?

    In Numbers, when adding text within a table frame, how can I start a new line within the same frame (rather than advancing to the next cell)?  I'd like to enter a mini-list of several items of various lengths of data.

    While Wayne's answer solves your problem, another possibility is to uncheck the box at the bottom of the Table inspector for "Return key moves to next cell." If that is unchecked, the return key types a paragraph return within the cell (the same as Option Return with the box checked).
    With that box unchecked, Shift Return types a soft return (new line without a paragraph break).

  • How can I open my file after 'cannot find -filename-' error message?

    OK, the bottom line is, InDesign crashes and I cannot recover my file. I get a 'Cannot find file' error message when I try to open the file.
    I am using CS6 on a MacBookAir, OS X Yosemite.
    I have tried finding the 'InDesignFileRecovery' folder, I cannot find it anywhere, it's not in my Library or Caches folder.
    However, I do work in dropbox, so I just headed over to dropbox to recover from their 'previous versions'. It starts to get weird. There are lots of previous versions (I save very regularly) but when I download a previous version (that I know was fine) it downloads with a indd.txt extension. So I remove the txt extension and keep the indd and everything looks fine, but then that recovered file gives the same message. I tried renaming the recovered file and opening that, same 'cannot find file' error message.
    I can open InDesign and open the file from the day before, but none of the dropbox earlier versions of that day's work. I am SO sick of this happening. It happened to me last week to, so far I have lost 20 hours work :-(
    I have tried quitting InDesign and restarting the Mac, doesn't help. The only thing I can think of is to 'save as' every couple of hours, at least then hopefully I only lose 2 hours work.

    Thanks, when you say 'hidden by default' then how does one find it? I have already tried the path you mention and there is no sign of a cache folder with Adobe files. Spotlight doesn't reveal anything either.

  • How can we open a file by clicking on a button "open"  in a pplet

    Hello all,,,
    I got some code to open a file in jre witout applets ....but i'm in need to open a file (for exmple to open a .txt file in text editor or notepad automatically by clicking on a button);
    Help me out...
    Thank you...

    pradeepprp wrote:
    Hello all,,,
    I got some code to open a file in jre witout applets ....but i'm in need to open a file.. On the server or client?
    ..(for exmple to open a .txt file in text editor or notepad automatically by clicking on a button);Earlier you mention 'open a file in jre', which implies maybe using a JEditorPane or similar to load the file contents into a JVM. Since the system generic 'text editor' and specifically 'notepad' are not embeddable in anything that can be put in a Java GUI, I am now confused as to whether you want to load the file within a Java based GUI or not. Which is it?
    Help me out...Buy me an ice-cream. A nice, big, ice-cream.
    People on forums do not generally take kindly to being told what to do, so it is better to turn commands like that into requests. The way to do that can be as easy as adding 'please' at the start of the command.

  • [pages 5.0.1] How can I add Pictures to the Text in a Table cell?

    Hi,
    is it possible to add a graphic to a cell in a table, where i have already entered some text?
    Everytime I insert the graphic, Pages makes it to the cell's background...
    Can anyone help me?
    Thanks.

    The feature to add images in tables is gone, ike about another 90 features that exists in Pages 09.

  • How can I open AdobeMuse.Lib files?

    I have downloaded an AdobeMuse.Lib file, but I can't open It. How can I open these files?

    Hi
    You will need to use "Import muse library option " in library section as shown below :

  • How can I open OS 9 files from my old computer on my 2012 MacBook Pro?

    How can I open OS 9 files from my old computer and use them on my 2012 MacBook Pro?
    David

    GriffinParkCondos wrote:
    How can I open OS 9 files from my old computer and use them on my 2012 MacBook Pro?
    David
    What type of files?
    Pete

  • How can i update the REMARK field in ADRT database table

    Hi all,
    How can i update the REMARK field in ADRT database table
    By using Function modules or BAPI’s
    Please reply me fast

    Hi,
    you can try this code:
        SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
        IF sy-subrc = 0.
          CLEAR adrct.
          SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
          IF sy-subrc = 0.
            adrct-remark = wa_remark.
            MODIFY adrct.
          ENDIF.
        ENDIF
    best regards,
    Thangesh

  • How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. I tried RIGHT-CLICK and the "open dowloading folder" or something does not work! P

    How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. Even the right-click is not working ... the "open containing folder" does not work.
    == This happened ==
    Not sure how often
    == ALWAYS! ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)

    Open Containing Folders is never active.

  • I click a link but it doesn't open. Instead I get a popup saying "Open the link in a new window," "Open link in a new tab," etc. How can I kill this popup or whatever it is forever?

    I click a link but it doesn’t open. Instead I get a popup saying “Open the link in a new window,” “Open link in a new tab,” etc. How can I kill this popup or whatever it is forever?

    That happens if the server sends the file as text/plain.
    You can see this if you open "Tools > Page Info > General": Content-Type: text/plain
    Files send this way will always open in a tab.
    *https://developer.mozilla.org/Tools/Web_Console

  • When opening the Calendar app, I am greeted with a box that says "This calendar can not be refreshed."  After clicking on "OK" another box pops up saying "The server responded with an error."  How can I get rid of these?

    When opening the Calendar app, I am greeted with a box that says "This calendar can not be refreshed," and after clicking ok there is another box saying "The server responded with an error."  How do I get rid of this.  The calendar functions all right, but just have to close both of those boxes after doing any action in the calendar app.

    Please take each of the following steps that you haven't already tried, until the problem is resolved. Back up all databefore making any changes.
    Step 1
    From the Calendar menu bar, select
    Calendar ▹ Preferences ▹ Accounts
    Choose the affected account from the list on the left and uncheck the box marked
    Enable this account
    Then check the box again. Test.
    Step 2
    Make a note of the account settings, then delete the account and add it back with the same settings.
    Step 3
    If you can't add the account, the settings may be invalid. Verify them. How you do that depends on what kind of account it is. If it's a Google calendar and you've activated 2-step verification, you need to generate an application-specific password in your Google account and enter it in place of your old password.
    Step 4
    Quit Calendar. Triple-click the line below on this page to select it:  
    ~/Library/Calendars/Calendar Cache  
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a file named "Calendar Cache" selected.
    Move the selected file to the Trash. There may be one or two other files in the same folder with names that begin in "Calendar Cache". If so, delete those files too.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

Maybe you are looking for

  • Switcher Error in Hgrid

    I ' ve created Hgrid , with switchers at detailed record. But when i 've tried to expand the Hgrid , the page has gone into error and showing the error as Definition of <view attribute> not found in view object. so for the cross verification, i' ve c

  • Add sales organisation to existing material

    Hi. I need to expand the sales organisation for an already existing material. I knew the process but have not used it in a while so now it's forgotten but I know it is possible. Any clues? Ryan

  • SQL 2012 Always on with WFC

    Hi Expert, I have following infrastructure at par. where i have 3 server in WFC(Windows Failover cluster) Win2012 and out of 3 servers two servers are active/passive cluster with SQL Instance hosted on it and i have created AG group for 3 users datab

  • XDO Delivery_Throwing an error in r12

    Dear Team, We are having an issue in our R12 applications.When we send Separate Remittance Advice we are getting an error like... Loaded email attachment file prefix from DB: Message { Code = IBY_FD_EMAIL_ATT_PRE, Cause = Payment} Preparing for email

  • Recursive eval in jsp/java ?

    hi - i have a simple jsp that uses a bean to go to the database and grab content to be displayed on the webpage. the problem is that the content in the database itself has some java scriplets in it which are not evaluated since the jsp was already be