WdFireEvent

Hi,
I tried to use custom events in a WebDynpro Development Component.
To do this, I created an Event in "component one" of my project. I tried to fire this event with:
"wdThis.wdFireEventValidatePassword();"
In "component two", of the same project I tried to implement a event handler. I created this handler in with the Methods-Tab, within the "component interface controller", of "component two".
I did not more. I thougt, that with "wdFireEvent" from Comp1 the EventHandler in Comp2 would be called, somehow.
But blame me, nothing happend.
Can anybody give me an example, how I can "Fire" a event in one component, and react in an other component??
Thanks
Richard

Hi create a event in component 1 and call this event in a method some times this firing dosent happen in wdDoInit
so try firying this in some custom method and in Component 2 create a event Handler and subscribe to this Method in the component 2 and tr printing some message
for example i have create a method in my interface contoller and called this method from my view controller.
in the method of my interface controller i have fired an event and in the view controller of component 2 i have created an event Handler and subscribed to this event. so this event handler in component 1 is automatically called when the Method of the Interface Controller in Component 1 is called.
ok here is the sep by step procedure
Component 1
1. create a method in interface Contoller.
2. create a event in interface contoller.
3. call this event in the Interface contoller Method
4. call this interface controller Method from the viewController.
component 2
1. create an Event Handler in viewContoller of component2 and subscribe to this event.
2. print some message in this event and see if results are getting displayed

Similar Messages

  • Changing Properties At runtime

    Hi SDN's,
    I m having a Veiwset(Grid) like
            VIEW1
            VIEW2
    View1 is having one dropdown list(say selecting Country), view2 is having custid, custname input fields.
    while executing program, i hav to select sme country frm view1,
    so the cust-id in the view2 should start with country key and view1 should be in read-only mode.
    can u give me sme idea.
    thanks in advance

    hi Renu,
    This means that event raised in view1 should affect action in view 2.
    Lets say your DDK(dropdownkey) in view1 is DDK1 and ip2 is input field from view2,
    Now there are two ways to get what you want,
    1: if the context attribute, which you have mapped to DDK1 is in component then map that to view2 too, here, in OnSelect action of DDK1 when the view1 navigates to view2, that attributes value can be read and then corresponding action can be performed . This action is nothing but defining proper customer id in view2.
    2:
    a)define a method in component controller,
    b)declare an event too , in component controller
    c)goto View1, in properties tab , under Required controller , define use of component controller(if it is not there) where you have defined a method and an event.
    d)goto view2, define an event handler here, in its "Event Source" give name of your component controller and in "Subscribe event" give the name of event defined in component contr.(define use of controller here too, in properties tab)
    e)in OnSelect action of DDK1(defien one action for this and assign it to OnSelect property), call the method defined in component contr as,
    wdThis.wd<component>Controller().<method name>();
    in this method of component contr write code,
    wdThis.wdFireEvent<event defined in component contr>();
    Since this event is subscribed in view2, this event handler will get called, in that event handler write your code of setting customer id for view2 depending upon the country of view1
    2nd one is little difficult approach, 1st one is simple but there you need to map the context attribute though it is not used in view2(just to read its value for further proccessing)
    hope it helps
    let me know if you face any problem in this
    regards

  • Regarding Events in webdynpro

    Hi all,
    I understood the concept of action,it is if we create action and assign it to any UI element ,then in "onactionmethod",we will write the required code.....,
    but I am not able to understand the concept of event.
    what is event?how does it work?how to handle it?
    wdThis.wdFireEvent<eventname>;
    if we write this piece of code ,where the control goes and what happens?
    Thanks in advance.

    Hi,
    the Events are neccessary for example calling a method of a View from the Component Controller.
    You can do that by creating an Event on the Controller, and creating an Event Handler
    int the Method Tab of the view. In the Eventhandler you can select the Event that should
    be listened to.
    Now if you fire th event on the controller like this: wdThis.wdFireEvent<eventname>;
    The according eventhandler will be executed in the view.
    Hope this helps,
    Regards,
    Dennis

  • Tracing flow of events

    Hi,
    I have a DC project with a lot of components in it. I do not have DEBUG option available.
    I have a component which raises an event in its interface controller .(wdFireEvent)
    I want to trace which component or...view.. handles this event..
    Any tips on tracking it would be helpful..
    Regards
    Bharathwaj

    hi,
    chk this.
    First event -
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    This event keyword defines an event block whose event is triggered by the ABAP runtime environment
    when calling the executable program selection screen processing of a selection screen.
    In an executable program, all statements that are not declarations,
    and are listed before the first explicit processing block, are assigned to this event block.
    If the program does not contain an explicitly defined event block START-OF-SELECTION,
    these statements form the complete event block START-OF-SELECTION.
    If a program contains an explicitly defined event block START-OF-SELECTION,
    these statements are added to the beginning of the event block.
    If the program contains no explicitly defined event blocks,
    these statements form the entire event block START-OF-SELECTION.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    at user-command
    http://help.sap.com/saphelp_47x200/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    Regards
    Anver

  • Eventing across windows (from popup to parent)

    On click of a button in the popup I want to be able to fire a plug on a particular view in the parent window.
    Is there any way to do that? I notice that I cannot create outbound plugs across windows? (Am i missing something here?)
    thanks,
    rakshit

    Hi Rakshit,
    Make one action on any button click.
    Make one method in your component controller.
    Make one event in your Component controller from Event tab. Now, for calling this event, write following code in method created above.
    wdThis.wdFireEvent<Event name>();
    Now, call this component method from your popup view based on whatever action.
    Now, in your parent view, make one event handler from methods tab.Here, select your event source as your component controller select event in Subcribed event field.
    Now, write code whatever you want like changing the view, inside this event handler.
    I think its clear to you. If you get some problem, with this then come back to me.
    Regards,
    Bhavik

  • Eventing Problem Across Windows in 2004s

    Hello Friends,
    Recently we have migrated all our applications to 2004's. We have one problem with Server side Eventing in 2004's. It was working fine in 2004.
    In a single component, server eventing between two windows are not working. We are calling second view (Popup) from first view. Popup is displaying but it doesn't call the method.
    Is there any limitation in 2004's?
    Regards,
    Sridhar

    Hi Rakshit,
    Make one action on any button click.
    Make one method in your component controller.
    Make one event in your Component controller from Event tab. Now, for calling this event, write following code in method created above.
    wdThis.wdFireEvent<Event name>();
    Now, call this component method from your popup view based on whatever action.
    Now, in your parent view, make one event handler from methods tab.Here, select your event source as your component controller select event in Subcribed event field.
    Now, write code whatever you want like changing the view, inside this event handler.
    I think its clear to you. If you get some problem, with this then come back to me.
    Regards,
    Bhavik

Maybe you are looking for

  • No more connections available to this remote computer...Urgent Help for File server...

    Hi Guys, I need urgent help regards to our school File server which is having "No more connection to this remote computer error" on SMB Shares where I usually authenticate with a domain username it used to work fine since till 3 weeks ago. Now I can

  • SRM MDM Catalog ---- SRM

    Hi, Is there a middleware (Pi) required to connect "SRM MDM" with "SRM" ? Can anyone explain the integration between these two. Points will be given Thanks!

  • Work flows in E-sourcing

    Hi, I need a sample exercise to work on E-Sourcing work flows. Please share the links or material which will help me to work on work flows. Regards, Naresh

  • Archiving in SRM 5.0

    Hi ... I am planning to do archiving my SRM system (SRM server 5.5). I could see lot of documentations from help.sap.com for archving. But have some questions apart from that: 1. Can we do archiving for master data like vendor master, material master

  • Cs5 / dynamic link / MP

    working with cs5 production bundle, dual xeon 5650, quadro fx 3800, 12gb ram. every time i import a premiere sequence (avcintra100) into ae, the multi-processor rendering is disabeld because of "incompatible effects or expressions" . no effects in th