How to throw and handle event defined in component interface

Hi folks,
I have defined a component interface with an event 'open_info'
I have some sub components which are implementing that component interface. I also get the two events generated (the interface check box is not marked)
I use those sub components and try to handle the event. but unfortunately the event is not handled.
I'm not sure if I do everything right. I checked the interface checkbox at the events tab of the controller of the sub component. I then may handle the event in the embedding main component. but it appears to be a different event.
probably I eed to access the interface controller and throw the event there, but I don't know how.
I couldn't fnd documentation or wdr* components which deal with that issue. do you have any suggestions?
regards
stefan

Hi Stefan,
Do the following in the component being used:
say component name is ZCMP_01
go to COMPONENTCONTROLLER
Create an Event with necessary parameters if needed, say Event name is EVNT_01 and has an importing parameter, say PARAM_01 type char10,
Make sure you have set the interface check box. Now this event is available in the INTERFACECONTROLLER.
Say ZCMP_01 has a view with a button, on click of the button, call a method in the COMPONENTCONTROLLER.
Perform all the required operations, At the required point, fire EVNT_01
wd_this->fire_EVNT_01_evt(
      PARAM_01 = 'sample' ).
Now the other component that has to use ZCMP_01, say ZCMP_02
In the component properties od ZCMP_02, add usage for ZCMP_01, say USG_CMP_01
Go to the view in ZCMP_02 where you wish to handle the event EVNT_01 of ZCMP_01,
Go to Methods tab, create an event hadler, say EVNT_01_HNDLR ... method type = Event Handler,
Event = EVNT_01, Controller = INTERFACECONTROLLER, Component Use, USG_CMP_01.
Now your event handler will have foll parametrs: WDEVENT .. type ref to CL_WD_CUSTOM_EVENT,
PARAM_01 type CHAR10
Handle the event as required.
Regards,
Reema.

Similar Messages

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

  • How to make a cell in a JTable to be uneditable and handle events

    I tried many things but failed,How do you make a cell in a JTable to be uneditable and also be able to handle events>Anyone who knows this please help.Thanx

    Hello Klaas2001
    You can add KeyListener ,MouseListener
    Suppose you have set the value of cell using setValueAt()
    table.addKeyListener(this);
    public void keyTyped(KeyEvent src)
    String val="";
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    val=table.getValueAt(r,c).toString();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor(r, c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt(val,r,c);
    public void keyReleased(KeyEvent src)
    public void keyPressed(KeyEvent src)
    table.addMouseListener(this);
    public void mouseClicked(MouseEvent e)
    public void mouseEntered(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    if(e.getClickCount()>=2)//Double Click
    table.clearSelection();
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor (
    r,c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt("",r,c);
    }//Mouse Released
    You can remove keyListener and Mouse Listener whenever You want to edit
    then add it later.
    Regarding handling events implement javax.swing.event.TableModelListener
    table.getModel().addTableModelListener(this);
    public void tableChanged(javax.swing.event.TableModelEvent source)
    TableModel tabMod = (TableModel)source.getSource();
         switch (source.getType())
    case TableModelEvent.UPDATE:
         break;
         }//Table Changed Method
    //This method gets fired after table cell value is changed.

  • How to load external swf and handle events of external swf by passing data .

    Hi all
    I have to laoad external swf (made in flash).On loading i have to pass data and hndle events which occurs on this swf.
    Can any one suggest me how can I achieve this.
    Regards
    Munira

    Here is one way:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f9c.html
    HTH,

  • How to catch and handle soap foult in a BPM process?

    Hi,
    I have a BPM process which calls a webservice in one of its activities. The webservice throws an exception so the response will contain a soap fault element. I defined exception handlers to handle the error but none of the exception handlers are called. How can I catch and handle these types of error?
    The log contains this:
    A component failed while executing activity '/Process1#Default-1.0/Automatic' (BP-method Automatic) over instance '/Process1#Default-1.0/3/0'.
    Details:
    The method 'CIL_automatic' from class 'BEA_Systems__Inc__.Process1.Default_1_0.Instance' could not be successfully executed.
    Caused by: <?xml version="1.0" encoding="UTF-8" ?>
    <MyException faultString="" faultCode="{http://schemas.xmlsoap.org/soap/envelope/}Server"/>
    fuego.lang.ComponentExecutionException: The method 'CIL_automatic' from class 'BEA_Systems__Inc__.Process1.Default_1_0.Instance' could not be successfully executed.
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:498)
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:251)
         at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:214)
         at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1068)
         at fuego.server.execution.TaskExecution.invoke(TaskExecution.java:389)
         at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:481)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:655)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:616)
         at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:152)
         at fuego.server.execution.activities.XAutomatic.execute(XAutomatic.java:60)
         at fuego.metadata.Activity.execute(Activity.java:1022)
         at fuego.server.execution.ToDoItemAutomatic.execute(ToDoItemAutomatic.java:35)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:290)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:462)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:540)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:213)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:117)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:57)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:264)
         at fuego.server.execution.ToDoItem.run(ToDoItem.java:531)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:754)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:734)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:140)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:132)
         at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:432)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:818)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:397)
    Caused by: fuego.soaptype.SoapExecutionException: <?xml version="1.0" encoding="UTF-8" ?>
    <MyException faultString="" faultCode="{http://schemas.xmlsoap.org/soap/envelope/}Server"/>
         at fuego.soaptype.SoapCall.processRemoteException(SoapCall.java:531)
         at fuego.soaptype.SoapCall.invoke(SoapCall.java:292)
         at fuego.soaptype.SoapObject.invoke(SoapObject.java:272)
         at fuego.lang.Invokeable.invokeImpl(Invokeable.java:220)
         at fuego.lang.Invokeable.invoke(Invokeable.java:161)
         at BEA_Systems__Inc__.Process1.Default_1_0.Instance.CIL_automatic(Instance.java:265)
         at BEA_Systems__Inc__.Process1.Default_1_0.Instance.CIL_automatic(Instance.java:281)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:491)
         ... 27 more
    Thanks,
    fifty

    Hi fifty,
    Did you get a solution to the above problem you have mentioned? I have a similar issue i am trying to fix.
    I have a webservice call in a process activity and if the call does not work i get a soap fault and the fuego.lang.ComponentExecutionException . My process requires that i catch the exception infact any kind of exceptions that occur on that call and perform another activity in the process.
    I have defined an exception handler at the activity level for java.lang.Exception and java.lang.RunTimeException.
    i don't see anything in the catalog which would handle the SOAP fault OR the componentexception.

  • How to use JDI handle event, need you help!~

    Hi,
    In our recent project, I need listen some event such as ClassPrepareEvent, MethodEntryEvent using JDI and handle it. I am trying to mend the TTY and let it
    do something simple when MethodEntryEvent occur.
    I just add a print line in the method methodEntryEvent in TTY.java. But I noticed that this method is not invocated after I input "run" commond. I don't konw why? And how can I listen this event? And when the methodEntryEvent method in TTY will be invocated?
    Anyone can help me ???
    Thank you!!!
    PS: methodEntryEvent method is post as follow:
    public void methodEntryEvent(MethodEntryEvent me) {
    Thread.yield(); // fetch output
    //notice:
    //i want print this sentens when every method entry.
    System.out.println("Method Entry:");
    StringBuffer buffer = new StringBuffer("\nMethod Entered: ");
    buffer.append(me.method().declaringType().name());
    buffer.append(".");
    buffer.append(me.method().name());
    buffer.append(" ");
    out.print(buffer.toString());
    otherEvent(me);
    Duan
    SJTU

    You must enable a MethodEntryRequest before any MethodEntryEvent will
    be reported.
    In the jdb/TTY reference debugger, use the 'trace methods [thread]'
    and 'untrace methods [thread]' commands to turn tracing on or off
    for method entry and exit.
    Once you request MethodEntry/Exit notification, then the methodEntryEvent
    handler in TTY.java will be called and you will see the println() you
    added to the code.

  • How to throw a resize-event?

    Hi,
    is it possible to throw a resize-event? And do I have to code it?
    Thanks

    Not quite sure what you mean by "throw" here, but you can define a ComponentListener and add it to a component. One of the methods is componentResized().
    hth

  • Dynamic Creation of list box on excel sheet and handling events

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

  • What is Triggering and Handling Events  in ABAP  OOPs

    Gowri

    ) TYPE type ..
    To declare static events, use the following statement:
    CLASS-EVENTS ... ...
    It links a list of handler methods with corresponding trigger methods.  There are four different types of event.
    It can be
    ·        An instance event declared in a class
    ·        An instance event declared in an interface
    ·        A static event declared in a class
    ·        A static event declared in an interface
    The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies. 
    For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler.  You can either specify a single instance as the trigger, using a reference variable
    After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling).  If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
    Handler methods are executed in the order in which they were registered.  Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
    "Example  :
    REPORT demo_class_counter_event.
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS increment_counter.
        EVENTS  critical_value EXPORTING value(excess) TYPE i.
      PRIVATE SECTION.
        DATA: count     TYPE i,
              threshold TYPE i VALUE 10.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD increment_counter.
        DATA diff TYPE i.
        ADD 1 TO count.
        IF count > threshold.
          diff = count - threshold.
          RAISE EVENT critical_value EXPORTING excess = diff.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    CLASS handler DEFINITION.
      PUBLIC SECTION.
        METHODS handle_excess
                FOR EVENT critical_value OF counter
                IMPORTING excess.
    ENDCLASS.
    CLASS handler IMPLEMENTATION.
      METHOD handle_excess.
        WRITE: / 'Excess is', excess.
      ENDMETHOD.
    ENDCLASS.
    DATA: r1 TYPE REF TO counter,
          h1 TYPE REF TO handler.
    START-OF-SELECTION.
      CREATE OBJECT: r1, h1.
      SET HANDLER h1->handle_excess FOR ALL INSTANCES.
      DO 20 TIMES.
        CALL METHOD r1->increment_counter.
      ENDDO.
    The class COUNTER implements a counter. It triggers the event CRITICAL_VALUE when a threshold value is exceeded, and displays the difference. HANDLER can handle the exception in COUNTER. At runtime, the handler is registered for all reference variables that point to the object.
    Reward  points if it is usefull ...
    Girish

  • How to monitor and handle SM35 ?

    Hi,
    Please tell me how to monitor and error handling at SM35.
    how we can use this SM35 exactly?
    Regards,
    Gayathry.

    here is the detailed explanation of batch jobs:
    SM35
    Abhi

  • How to create and handle a text file in CVI

    Is there any way to create and handle (like...open,write,read,truncate,close)  the .txt file in CVI?

    Sure. CVI is a regular C compiler and hence you can use all ANSI C functions. In addition you can use the File I/O functions from the utility library.

  • How do I pass an event up the component hierarchy?

    I have a child component which has a mouse listener and a parent component with a mouse listener. However the child component consumes all the mouse events so the parent doesn't get them.
    Is there a way for a child component to receive mouse events, then decided to pass them back up the component hierarchy so the parent can still receive them too?
    I've spent the last two hours on Google and can't seem to find anything relevant.
    Cheers, Eric

    Unfortunately, you cannot
    override this method since it ispackage-private.
    That was wrong of mine. Package-private members are
    visible to subclasses too (the package access is a
    complete superset of protected access). So you CAN
    override dispatchEventImpl and do your stuff there.
    When I try that the compiler gives me the following warning
    The method SheetElementPlacementComponent.dispatchEventImpl(AWTEvent) does not override the inherited method from Container since it is private to a different package.
    It lets me define the method, but does not let me override it.
    I just wonder why they made dispatchEvent() final,
    when it just calls dispatchEventImpl(), and it is
    not final...
    Another useful method is Component.enableEvents()
    and disableEvents() (which are both protected). You
    can use them to modify the so called event mask of a
    component, which is used to signify which events a
    Component is interested in. Disabled events (= not
    on the event mask) are not delivered to the
    component and the dispatcher skips it, looking for
    parent components which have enabled the event. For
    example, if you have a JButton in a scroll pane and
    you scroll the mouse wheel on the button, the event
    is dispatched to the scroll pane, even though it
    occurs over the surface of the button. That's
    because a button is not interested in mouse wheel
    events.
    You can use that hack the following way: In the
    mouse listener for your child component, after you
    have done your work, disable mouse events for the
    component and then post the event again (invoke
    dispatchEvent(theEvent)). That way, the event should
    be delivered to the closest parent that is
    interested in mouse events. This is done
    synchronously, so after all listeners for the parent
    components have finished, the dispatchEvent() method
    returns in your listener for the child component.
    Then you re-enable mouse events on the child
    component in order to receive the next mouse event.
    I don't know if this works or if it has any side
    effects, but it's worth a try...I can't call dispatchEvent() because it creates an infinite loop resulting in a stack overflow. It tried calling((JComponent) getParent()).dispatchEvent(e); but this does not help either, the parent never gets the event.
    Hope this helps you more :).
    Greets,
    MikeSorry, I still can't find a way around it other than to redesign my UI.
    FYI I created a bug report and Sun have assigned it Bug Id: 6571453. Everyone please vote on this if you think it's a cool feature request.
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6571453
    Cheers, Eric

  • How to create an handle for Miniport driver Ioctl interface?

    Hi All,
    I am trying to create an handle for my miniport driver Ioctl interface, but it showing the following error while opening the handle with CreateFile API.
    "you are requesting IOCTL_HAL_GET_DEVICE_INFO::SPI_GETPLATFORMTYPE,
    which has been deprecated. Use IOCTL_HAL_GET_DEVICE_INFO::SPI_GETPLATFORMNAME
    instead"
    Can anyone suggest on how to create the handle for Miniport Ioctl interface?
    Thank you,
    Sagar

    Hi,
    I have seen this error only in GUI based apps. Maybe you are pointing to the wrong error.
    Check if CreateFile returns INVALID_HANDLE_VALUE. API return value should give you more information.
    Regards,
    Balaji.

  • How to create a time event without having user interface freeze

    Hi,
    I am new to labwindows and i am trying to create a time event where every hour for 24 hours i want my program to write somethign in excel. 
    I tried using function Delay and SyncWait and those functions freezes up the user interface.
    Any tips/help will be appreciated.
    Thank You
    Solved!
    Go to Solution.

    Many, if not most, CVI developers wind up implementing a delay function for themselves that periodically, during the delay, wakes up and processes events so that the GUI isn't frozen.
    The idea is to break the wait or delay up into pieces, and process system events in between each piece.
    A timer works too, you can try the async timer that Wolfgang mentioned, it runs a bit better and on a separate thread, so it lets you do what you normally would with the main thread and the GUI, yet still get timer function.   If you use a smart delay, you still wind up doing nothing a great deal of the time, and events are only processed periodically.

  • How to drag and drop events across months while in month view?

    Is there a way to drag an event across months when the view is set to monthly view?  I know the events can be dragged and dropped across the days in the month on the screen, but how can I carry through the end of the month - there does not seem to be a way to move the screen view to the next month while the event is being dragged!

    Hi,
    You can do it with keyboard shortcuts.
    Select the event. Press Cmd+X. Press Cmd and right or left arrow (depending if it is forward or back in months) until you are in the correct month. Press Cmd+V to pase on the same day in the new month.
    Best wishes
    John M

Maybe you are looking for

  • Macbook pro doesn't automatically connect to my wireless network

    I have set up my network preferences with my wireless networka the top of the list. This used to ensure I automatically connected, but now I have to manually connect everytime I wake my computer.

  • Hierarchy Variables in VC

    Hello, I have a question regarding using heirarchy variables from BW query in VC.  As a work around, I found a thread that saying that I can use web_api filed of the input port and integrate the web template that was created from WAD to show hierarch

  • Get called back as the data table is being rendered

    Hello: I have a datatable, like this: <t:column> <f:facet name="header"> <t:outputText value="Process" style="font-weight: bold" /> </f:facet> <t:commandButton id="ProcessButton" styleClass="sbttnHeader" actionListener="#{ProcessQueueBBean.processAct

  • Sales return PGR  issue for E stock

    Dear Sapients, Scenario I have created sales order stock, with account assignment u201CMu201Dand not with C (sales Order).Because we procure the stock at the time of sales Inquiry and w.r.t sales Inquiry. SAP system will allow delivery and PGI w.r.t

  • Workflow for PO re- release

    Gurus, ply help in develpoing a workflow Po re-released means value changed from 10rs to 20 rs an alert to the manager how is this possible regards amey