How to fire event in view controller from component controller.

I have a component usage that fires an event wich i have subscribed in the component controller.
      iv_usage->subscribe_event( iv_event_name = 'TAKE_IT'
                                 iv_handler = me ).
After the event the method IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT in the component controller is called.
method if_bsp_wd_event_handler~handle_event.
endmethod.
The usage component is opened as a popup window. After pressing a button, the data is transfered via context node binding to the calling component. But now i want to close the popup.
My intension is to fire a event for the view controller in the IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT method that closes the popup.
Is this possible?
Or let me explain it this way:
I want to close a popup after a button in the popup is pressed.
best regards
Jürgen

Hello Juergen
I am assuming your target pop-up is of type ref to IF_BSP_WD_POPUP.
1.Make this a view controller class attribute.
2. After the code to create the pop-up, you can add the following block :
gv_target_popup->set_on_close_event( iv_view = me iv_event_name = 'CLOSEPOPUP').
3. Now define event handler EH_ONCLOSEPOPUP where you can write the logic for on_close.
You can access the same reference gv_target_popup at the event handler level as well.
Hope this helps.
Regards
Nisha

Similar Messages

  • Calling view method from component controller

    Hi Experts,
    How to refer a view method from component controller?

    if you have the view Instance, then you can call using the view instance. But this is not the correct apporach.

  • How to fire event to generate insert message for the child objects?

    We are in process to integrate CRM On Demand and existing Microsoft SQL DB.
    We have the following problem:
    For ex., we have CRM Object_1 that already synchronized with the SQL DB. CRM also has independent Object_2 and its child Object_2.1
    We dicided that we want to connect the Object_2 as child to the Object_1.
    The question is how to fire event to generate insert message for the Object_2 and Object_2.1?
    What is the best technique? Is it possible to do it by workflow configuration or it needs to be done programmatically?
    Thanks,
    Dmitry
    Edited by: 955827 on Aug 29, 2012 11:57 AM

    Hi,
    integration events can be generated only via worklow. You will need to create separate workflows for each record type (regardless if it is child or parent) because a workflow for the parent record type will not trigger when a child record is created/ associated. Also, the association workflows will trigger only when the specific event occurs.
    There is not way to generate the integrtaion events programatically. They are generated by workflows and are read/ interpreted by a code extension.

  • How to fire event in VS C# when QuickTime sees a marker.

    I am using Visual Studio 2005 C# to run QT with ActiveX.  I have set markers in the video file that show up in the window at the bottom of a QT movie.  I want to be able to capture that marker with an event handler and tell a microcontroller to do something when that marker is hit.  I've done a lot of research and can't find a way to extract the marker name or even find an event handler that will fire when the marker is hit.  Since QT shows the name in the window I'm thinking there has to be a way to get that information to a C# application.
    Any help would be appreciated,
    Steve

    hi,
    You can create a method from the methods tab in your view controller. Write the code for populating your combo box in this method. Now in the doInit you can call this method. In the action handler of the button also call this method.
    hope this helps you.
    regards,
    Rahul.

  • How to fire event on panel in coverflow?

    Hi,
    I have cover flow.Inside that 10 panels(created dynamically)  will be present.
    when u run application we will get coverflow.My requirement is when i click on first panel i have to
    fire event.similarly when i click on remaining panels(ie first click it will show to user(panel1) and second click on the same pane1(panel1) event
    will be fired.for suppose second click on panel2(not panel1),then i dont want fire event).How to do that?
    Regards
    D.Mahesh Babu

    Hi Sarah,
    Looks like you are talking of exactly what I want!
    I have attached a sample VI to try achieve what I want. But it still has some issues which are:
    1) I am unable to configure a Plot Attribute Change Event. I have used a mouse leave event instead. How does one configure a Plot Attribute Change Event?
    2) Is there no single property which will transfer all the settings of plot legend from one graph to plot legend of another graph? In my sample VI, I have to read each property of the master graph and feed it into the slave graph.
    Kindly note I am using LV FDS 7.1 on Win2000
    Thanks,
    Gurdas
    Message Edited by Gurdas on 03-27-2006 11:51 PM
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu
    Attachments:
    Graph_PlotLegend_Event.vi ‏45 KB

  • How to Print the whole view content from a button on the View Layout

    Dear All,
    Good Morning All
    I am New to WebDynPro.Solution needed Urgently
    How to take print whole view content(lay out) in
    webdynpro application.i.e whatever it may be tablecontent or label or inputfield .
    Could you send the coded part briefly step by step from the beginning itself i.e
    i put the button in the view lay out below the printed parts(label or inputfield) name like show preview .
    Now my Question is what should i write in show preview function to take the print in label fields in the webdynpro view lay out
    B'cos i am new to webdynpro.Help me
    Thx in advance
    Regards
    Dhinakar

    Web Dynpro by default does not provide the option of printing the view content.
    However still you have a round about way of doing it. Create the an html page similar to the Web Dynpro page. Store the code into a String variable.
    String html="<html> ....<scripts>window.print()</scripts></html>";
    bytes[] source=html.getBytes();
    try{
    byte[] b=new byte[1];
    IWDCachedWebResource res=WDWebResource.getWebResource(b,WDWebResourceType.HTML);
    String url=res.getURL();
    }catch (WDURLException e) {
              // TODO: handle exception
    Now open the url in a new window and that would print the content of the html page.
    Regards,
    Noufal

  • How to Print the whole view content  from a button on the view

    Dear All,
    Good Morning All
    I am New to WebDynPro.Solution  needed Urgently
    How to take print whole view content(lay out) in
    webdynpro application.i.e whatever it may be tablecontent or label or inputfield .
    Could you  send the coded part briefly  step by step from the beginning itself i.e
    i put the button in the view lay out below the printed parts(label or inputfield) name like show preview .
    Now my Question is what should i write in show preview function to take the print in label fields in the webdynpro view lay out
    B'cos i am new to webdynpro.Help me
    Thx in advance
    Regards
    Dhinakar

    Web Dynpro by default does not provide the option of printing the view content.
    However still you have a round about way of doing it. Create the an html page similar to the Web Dynpro page. Store the code into a String variable.
    String html="<html> ....<scripts>window.print()</scripts></html>";
    bytes[] source=html.getBytes();
    try{
    byte[] b=new byte[1];
    IWDCachedWebResource res=WDWebResource.getWebResource(b,WDWebResourceType.HTML);
    String url=res.getURL();
    }catch (WDURLException e) {
              // TODO: handle exception
    Now open the url in a new window and that would print the content of the html page.
    Regards,
    Noufal

  • How to add search field to BP_HEAD_SEARCH from component BP_SALES?

    Hi experts,
    I'm quite new to the CRM 2007 and I need help to fulfill a request. It sounds actually quite simple:
    The field "Sales Office" from Sales Area Data should be displayed in the Account Search page as possible search field:
    To Change:
    Component: BP_HEAD_SEARCH
    View: MainSearch
    Sales Office is from:
    Component: BP_SALES
    View: CorpAccountOrgEF
    Context Node: BUILRESORG
    Attribute: STRUCT.SALES_OFFICE
    I've searched all moring in this forum but nothing could help me. Any help is appreciated and rewarded if useful!
    Thanks!
    / Melanie

    Melanie,
    The problem you have is you need to extend the search in all the layers of the application, So this means the following:
    1.  You added the field to the context node
    2.  You need to add the field to be visible in the configuration
    Now for the part not being done, the field needs to be present in the structure:
    CRMT_BUPA_IL_HEADER_SEARCH in order to work.
    Look at the GENIL/BOL class CL_BUPA_IL_HEADER_SEARCH->GET_RESULT_TABLE.
    You will also need to implement the BADI in the enhancement spot CRM_BUPA_IL_SEARCH in order to make your search work correctly.
    Read the documentation for the BADI BADI_CRM_BUPA_IL_SEARCH_EXT in the search extension for more details.  If explains exactly how to do what you want to do.
    Take care,
    Stephen

  • How to stop events that span midnight from displaying on 2 days

    Somewhere around SnowLepoard iCal's default behavior changed. It used to be that If an event spanned midnight (e.g. 7p-7a) then in the Month view it would only show up on the day the event started.
    Now in Lion, it produces a colored bar that spans both days with 'ends 7am' on the right hand side of the bar in the second day. In Month view this is annoying and clutters the display when you have several consecutive events that span midnight e.g. three 7p-7a events in a row.
    How can I get the old behavior back without editing events as many of them are from calendar subscriptions?

    I work the same kind of shift, one that spans all night. Mine show with the start time on the correct day and another one for the end time on the next day.

  • Handle button event of popup created from component controller

    Hi all,
    I have created a method for created popup in the component controller with button kind 'yes-no'.Now i use it in the view.
    Till here all is working fine.
    Now i want to use the events which triggers on the popup (yes, no).Any idea how to trigger these buttons action.
    The problem i am facing here is: When i use <b>subscribe_to_button_event</b> method it does not working.
    Any ideas how to use this.
    Points will be sured.
    Sanket sethi

    hi sanket.........
    here is a code snippet... check this out.
    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.   
      insert `Do you want to save?`        into table l_text.   
      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 ).
      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( ).
    --regards,
      alex b justin

  • How to fire event to a textarea?

    Hi all!
    I am developing a small chat application where the data typed at the client on a textarea should be reflected in the textarea at the server. I can send data through the network and append it at the client. But if I want to handle the special keystrokes like backspace and all, I need to manually identify the code for that particular key and then do that operation on the server textarea. But what I am trying is I will send the TEXTEVENT object through the network and using information in it, I will construct a new TEXTEVENT object by changing the source object alone. Then I want to fire that on the textarea. We have a method processTextEvent in TextComponent(base of textarea). But it is protected and so even if I try to extend the textarea and do it, I don't have access to that method.
    Can anyone help me out!
    Thanks in advance.
    Bye
    Vijay

    Here's some code that works in Window$, but fails badly in Solaris 9. In Solaris it doesn't display the characters and produces an "unexpected exception in code outside the JVM".
    Here's the client
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import java.util.LinkedList;
    public class TestEC extends Frame implements KeyListener
         TextField input;
         Socket sock=null;
         boolean connected = false;
         InputStream is = null;
         ObjectOutputStream oos = null;
         Thread recvThread = null;
         Thread sendThread = null;
         Queue sendQueue = null;
         TestEC()
              input = new TextField(30);
              addWindowListener(new WindowAdapter()
              {public void windowClosing(WindowEvent evt){System.exit(0);}});
              add(input);
              input.addKeyListener(this);
              pack();
         private boolean connect(String address, int port)
              try
                   sock = new Socket(address, port);          // try to connect to port 9999 on my Solaris system
                   is = sock.getInputStream();
                   oos = new ObjectOutputStream(sock.getOutputStream());
                   sendQueue = new Queue();
                   recvThread = new Thread(new Runnable(){public void run(){doRecv();}});
                   recvThread.start();
                   sendThread = new Thread(new Runnable(){public void run(){doSend();}});
                   sendThread.start();
                   connected = true;
              catch(IOException e)
                   System.out.println("failed to connect to: "+address+":"+port);
                   sock = null;
                   connected = false;
              return connected;
         public void keyPressed(KeyEvent e){sendKey(e);}
         public void keyReleased(KeyEvent e){sendKey(e);}
         public void keyTyped(KeyEvent e){sendKey(e);}
         private void sendKey(KeyEvent e)
              sendQueue.push(e);
         public static void main(String[] args)
              String address = "127.0.0.1";
              if(args.length > 0)address = args[0];
              TestEC tec = new TestEC();
              if (tec.connect(address,9999))tec.show();
              else System.exit(0);
         // read and discard until close seen, then shutdown
         private void doRecv()
              int last = 0;
              try{while(connected && -1 != last){last = is.read();}}
              catch(IOException e){e.printStackTrace();}
              connected = false;
              try
                   sock.close();
                   sendThread.interrupt();
              catch(Exception ce){ce.printStackTrace();}
         private void doSend()
              Object obj;
              while(connected)
                   obj = sendQueue.pop();
                   if(obj != null)
                        try{oos.writeObject(obj); oos.flush();}
                        catch(IOException e){e.printStackTrace();}
         // a simple queue class between two threads
         class Queue
              LinkedList q = new LinkedList();
              public synchronized void push(Object obj)
                   q.add(obj);
                   this.notify();     // tell pop to run with it
              public synchronized Object pop()
                   if(q.isEmpty())
                        try{this.wait();}
                        catch (InterruptedException e){return null;}
                   return q.remove(0);
    } And here's the server
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    public class TestES extends Frame
         TextField output;
         Socket sock=null;
         boolean connected = false;
         ObjectInputStream ois = null;
         Thread recvThread = null;
         Thread listenThread = null;
         TestES()
              output = new TextField(30);
              addWindowListener(new WindowAdapter()
              {public void windowClosing(WindowEvent evt){System.exit(0);}});
              add(output);
              pack();
         private void start()
              listenThread = new Thread(new Runnable(){public void run(){doListen();}});
              listenThread.start();
         private void doListen()
              ServerSocket ssock = null;
              try
                   ssock = new ServerSocket(9999);          // listen on port 9999 on this host
                   sock = ssock.accept();
                   ois = new ObjectInputStream(sock.getInputStream());
                   recvThread = new Thread(new Runnable(){public void run(){doRecv();}});
                   recvThread.start();
                   connected = true;
              catch(IOException e)
                   System.out.println("listen failed");
                   sock = null;
                   connected = false;
         public static void main(String[] args)
              TestES tes = new TestES();
              tes.start();
              tes.show();
         // read and process events from socket
         private void doRecv()
              Object obj;
              while(connected)
                   try
                        obj = ois.readObject();
                        postEvent(obj);
                   catch(Exception e){e.printStackTrace(); connected = false;}
              try
                   sock.close();
              catch(Exception ce){ce.printStackTrace();}
         private void postEvent(Object obj)
              output.requestFocus();
              output.dispatchEvent((KeyEvent) obj);

  • How to fire event with parameter?

    Hi folks,
    does anyone know how to use the event parameter functionality?
    My idea is to fire an event within the richisland and pass a parameter value. As I recognized the function
    var myParameter:Number = new Number();
    FlashIsland.fireEvent(this,"myEvent",myParameter);
    On WD side in ROOTUIELEMENTCONTAINER I created a child element of type GACEvent, named myEvent. This event has a GACEventParameter named myParameter.
    But running the app I am getting a dump:
    WebDynpro Exception: ERROR: GAC_EVENT_PARAMETER 'myParameter' missing (GAC_EVENT='myEvent')
    Any idea of how to fix this?

    Hi,
    I solved it now. The correct syntax is:
    FlashIsland.fireEvent(this, 'myEvent', {myParameter:myValue});
    Hope it helps you too.
    Greets

  • How does one copy tables, views, etc. from one database to another?

    I do not have a strong DBA background but have been placed in charge of updating and migrating a number of tables and views across multiple databases.
    For the future I need a better workflow than exporting and importing tables to/from .csv files and copy and pasting the SQL from each individual view.
    Can somebody point me in the right direction? I'm happy to do some reading but have no idea where to look.

    The Export utility provides a simple way for you to transfer data objects between Oracle databases, even if they reside on platforms with different hardware and software configurations.
    When you run Export against an Oracle database, objects (such as tables) are extracted, followed by their related objects (such as indexes, comments, and grants), if any. The extracted data is written to an Export file.
    To use Export, you must run the script catexp.sql or catalog.sql (which runs catexp.sql) after the database has been created,Ensure there is sufficient disk or tape storage to write the export file,Verify that you have the required access privileges.
    Interactive Export Prompts
    If you prefer to let Export prompt you for the value of each parameter, you can use the following syntax to start Export in interactive mode:
    exp username/passwordExport will display commonly used parameters with a request for you to enter a value. This method exists for backward compatibility.
    let me know if you have any further query!

  • How to Filter list/library view pages from Search Results?

    Hi All,
    Currently my search configuration is searching everything on a site collection. I have created custom scope for that.
    But I would like to remove the search results for list/library views. The search should only show the documents, pages (but not list/library view pages).
    Please guide me on this.
    Appreciate your help.
    Thanks,
    Rahul Babar
    ASP.NET, C# 4.0, Sharepoint 2007/2010, Infopath 2007/2010 Developer http://sharepoint247.wordpress.com/

    Navigate to the site that contains the list or library that you want to change.
    Locate and click the list or library you want to customize.
    Click Site Actions, and then click Site Settings.
    Under Site Administration, click Site Libraries and lists.
    Click an item from the list, for example, Customize “Shared Documents.”
    On the List Settings page, under General Settings, click
    Advanced settings.
    In the Search section, under Allow items from this document library to appear in search results, select
    Yes to include all of the items in the list or library in search result or
    No to exclude all items from search results.
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/enable-content-to-be-searchable-HA010379092.aspx

  • How to add the model view controller in webcenter portal framework application

    i create a webcenter portal framework application.how to create a model class in my application..please help me.

    What you mean by this. You mean having model layer in webcenter portal framework application? Whats the exact requirement.? You want to create ADF BC in portal app.
    If you want to use adf taskflow application , i will recommend you to make separate adf application and use as shared lib in portal.

Maybe you are looking for

  • What happened to the option to buy your entire wish list in the iTunes Store?

    There use to be a "purchase your entire wish list" option in the iTunes store. So instead of buying 12 songs one at a time for $0.99 each, you could make one purchase for $11.88. That option appears to have been removed, or hidden. At least I can't f

  • Newbie here i need help

    i just got the droid 2 and im all new to the phone and features i had a blackberry for two years and i was use to that but so far i like the droid i some what know how to do certain things. Now the only problem  idk how to do is connect the droid to

  • What's this reason code of error mean?

    Date: Jun 14 10:49:57 Machine Name: CUCMPUB Severity: Error App ID: Cisco CTIManager Message: CTIManager: 694021: CUCMPUB.concordia.ca: Jun 14 2012 14:49:57.486 UTC : %UC_CTI-3-CtiProviderOpenFailure: %[CTIconnectionId=694134][LoginUserId=xxx][Reason

  • URGENT: Safari appends BZ2 to most downloaded DMG files!

    I've been downloading a number of DMGs from different websites, and Safari (or perhaps, my unzipping program The Unarchiver) has been adding .BZ2 to the end of them - making them virtually. unopenable. I was terrified there was something wrong with m

  • Can we add new fields to the seeded AdvanceTable

    Hi, I wanted to add new fields like LOV's to the seeded Advance Table AccountsDistsAdv Table in the page CheckoutDistdPG. This table is associated to the View Instance PoReqDistributionsVO. I am planning to add 6 LOVs to this table. How can I take th