Firing the custom event dynamically

Hi All,
  is it possible to fire the cutomevent IWDCustomEvent dynamically.Basically i have 2 buttons with their actions, on clicking  buttonA it does some logicA and when somecondition is met it should also do buttonB Action without userinteraction on buttonB
public void onActionButtonA(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionAddPlan(ServerEvent)
    wdComponentAPI.getMessageManager().reportSuccess("button 1 clicked:");
  if(conitionismet)
     it should dynamically call the onActionButtonB, for this how can i pass IWDCustomEvent  instance
    //@@end
public void onActionButtonB(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionAddPlan(ServerEvent)
    wdComponentAPI.getMessageManager().reportSuccess("buttonaction);
    //@@end
i cannot put the same LogicB inside the condition of if(conitionismet) of onActionButtonA.
So is it possible for fire an event onaction of a button dynamically without user interaction.
Thanks,
pkv

Hi,
You can just execute your function inside the "IF" clause:
public void onActionButtonA(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionAddPlan(ServerEvent)
wdComponentAPI.getMessageManager().reportSuccess("button 1 clicked:");
if(conitionismet) {
onActionButtonB(wdEvent);
//@@end
public void onActionButtonB(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionAddPlan(ServerEvent)
wdComponentAPI.getMessageManager().reportSuccess("buttonaction);
//@@end

Similar Messages

  • How to receive the custom event in the listening portlet (No backing file)

    I have couple of portlets (JPF based). Portlet A is firing an event
         public Forward processAction()
              PortletBackingContext context =PortletBackingContext.getPortletBackingContext(this.getRequest());
              String message = "XXXXX";
              context.fireCustomEvent("customevent", message);
              Forward forward = new Forward("success");
              return forward;
    I have configured the Portlet B's eventhandler to listen for the 'customEvent' and invoke the pageFlowAction 'listenForEvent'
         @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "test2.jsp") })
         public Forward listenForEvent() {
              Forward forward = new Forward("success");
              return forward;
    Portlet B's method listenForEvent is indeed getting invoked, but is there a way I can retrieve the 'Event' object (as fired by Portlet A) inside the listenForEvent. I could have done this via the Backing file, but for some reasons i cann't use the backing file. Is there a way i can get the CustomEvent and the associated payload in my listening JPF portlet, without a backing file?
    The WLP version is 10.3

    Hello,
    I originally said:
    All you should need to do is to modify the method signature for your event-receiving method. The method signature should be:
    public void listenforEvent(HttpServletRequest request, HttpServletResponse response, Event event)
    where Event is a com.bea.netuix.events.Event object. You can then cast this to a CustomEvent object.
    But I mis-read your earlier post about catching the custom event and invoking a pageflow action. When you do that, you will lose the custom event's payload (your message), and there is no way to retrieve it from your pageflow action.
    The only way you can actually retrieve the event's payload is using a backing file for the portlet, with a method having the signature I mentioned above. You can then set a request attribute with the event's payload and still have it invoke the pageflow action, at which time you could retrieve the request attribute value-- assuming you don't need to run this portlet over WSRP. Over WSRP, the event-handling and pageflow action-invoking lifecycles will happen with independent request objects, so you would need to store the event payload in session to work over WSRP.
    Kevin
    Edited by: kfrender on Aug 31, 2009 3:34 PM

  • APP-FND-01926 The Custom Event  WHEN-LOGON-CHANGED...

    Hi,
    After compiling and placing a 'custom' CUSTOM.pll (and plx) file on the server, when logging into Applications receiving ERROR:
    APP-FND-01926 The custom event WHEN-LOGON-CHANGED raising unhandled exception: User Defined exception.
    This is for R12.1.3
    The code was moved to the original base version of the R12 CUSTOM.pll file...
    I read many other Notes on this error, but most refer to an error related to a Program Unit Not found and requiring a regeneration of the JAR files.
    Would this be the same situation?
    When we place the original back in place the forms login works.
    Any ideas?
    Thanks,
    Lamonte

    check ur CLASSPATH environment variable ur Custom.plx library should visible on runtime to Classpath variable.
    Baig,
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • When login Apps, get APP-FND--01926: The custom event WHEN-LOGON-CHANGED ra

    When login Apps, get APP-FND--01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-01403: no data found
    Applied patch
    6241631 11i.ATG_PF.H.delta.7 (RUP 7) and it's pre-requisite patches
    Forms can not be launched successfully.
    APP-FND--01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-01403: no data found
    Followed
    Note 391243.1: Unable to access forms - getting APP-FND-01926 error (Doc ID 391243.1)
    Note 555409.1: Client Gets App-Fnd-01926 Every Time After Bounce Apps 11i Forms Service (Doc ID 555409.1)
    these two notes, can not solve the issue.
    Executed following action plans:
    1. Backup custom.pll file on your issued instance(DEV instance).
    2. Copy a custom.pll files from a working environments(i.e. PROD instance) to this issued instance(DEV instance).
    3. Compile the new copied Library CUSTOM.pll manually by running the command:
    f60gen module=CUSTOM.pll userid=APPS/APPS output_file=$AU_TOP/resource/CUSTOM.plx module_type=library batch=no compile_all=special4. The $FORMS60_PATH needs to be in sync with the the Context.xml specifically the s_f60path variable
    i.e >/oracle/apps/test10appl/au/11.5.0/resource:/oracle/apps/test10appl/au/11.5.0/resource/stub</FORMS60_PATH>
    5. Run Autoconfig instantiate the changes.
    Issue still exists.
    Please HELP~~
    Thanks,
    Jackie

    Hello Srini,
    app11i@hpfsapp2> ls -ltra CUSTOM
    -rwxr-xr-x 1 app11i dba 24576 Aug 29 2001 TMCUSTOM.pll
    -rwxr-xr-x 1 app11i dba 20480 Mar 8 2006 CUSTOM.pll.backup
    -rwxr-xr-x 1 app11i dba 24576 Feb 22 2007 CUSTOM.pll.20120215
    -rwxr-xr-x 1 app11i dba 32768 Oct 4 2007 CHRM_CUSTOM.plx
    -rw-r--r-- 1 app11i dba 36864 Oct 8 2007 CHRM_CUSTOM.pll
    -rwxr-xr-x 1 app11i dba 20480 Feb 14 15:20 TMCUSTOM.plx
    -rw-r--r-- 1 app11i dba 24576 Feb 15 09:22 CUSTOM.pll
    -rwxr-xr-x 1 app11i dba 16384 Feb 15 09:23 CUSTOM.plx
    I don't quite understand "only one copy of CUSTOM.plx in the PATH directories", what is PATH directories? How to check? You mean environment variable?
    EBS version: 11.5.10.2
    DB version: 9.2.0.8
    OS: Linux x86
    Thanks,
    Jackie

  • Assign receiver to the mail event dynamically

    Hello gurus,
    In ESS/MSS i am using a standard workflow which updates the personal information of employees. In SWEL transaction i figured out the event and the standard workflow which gets triggered. I made the copy of the workflow. Now in the copy workflow, i wanted to add a step of mail before updating. This mail is intended for the HR person.If the HR person approves the changes to be made, then only the database will get updated.
    For this, i want the mail id of the HR person to be selected dynamically. How can i do so? Can i write the content of the mail dynamically? If so how?
    Regards,
    Yayati Ekbote

    Hi,
    i want the mail id of the HR person to be selected dynamically.
    How can i do so
    I hope you would be having the PERNR of the HR Person, so by readin infotype 0105 ans subtype 0010 you can get the email ID of the HR Person dynamically.
    For this you need to create a bor method and call the function module HR_READ_INFOTYPE and pass the infotype as 0105 and subtype as 0010, if the email ID is maintained then it you have to read it and pass it back to the task container and then to workflow container ...
    so in the mail step choose the recipient type as EXPRESSION and choose the element in which you populated the email address.
    Can i write the content of the mail dynamically?
    yes of course you need to populate the entire mail body into a multiline container which should be of type solix.
    and choose this multiline container element in the mail body .
    Regards
    Pavan

  • JFrame.dispose not firing the windowsClosing event

    No this one is not quite like the question a few posts down, well not exactly anyway.
    I have a JFrame with a windowAdapter that handles my closing tasks, it works just fine currently as long as the close button on the frame is clicked. I had to add a check in the program that should close the window if its true.
    So I have code that checks a condition and if its true it shuts down all threads and trys to exit gracefully through the windowClosing event. As other posts have said I can use the jframe.dispose followed by System.exit and it works fine seeing that in the code thoughmakes me think its a kludge since dispose doesn't trigger the windowClosing event. I would like to somehow simulate clicking the close button on the frame when I need to exit because of an error but I'm not sure how to programatically do that.
    My current window close operation is set to DO_NOTHING_ON_CLOSE so that the windowClosing event can handle the closing, I tried setting the operation to EXIT_ON_CLOSE then disposing the frame when the error occured but that didn't trigger the windowsClosing event either.
    Any ideas?
    Thanks,
    Eudaemon.

    okay... So do something like this:
    private void init() { // or whatever...
       frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
             quit();
       quitmenuitem.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent.) {
             quit();
    public void quit() {
       // do whatever cleanup or checks or whatever...
       frame.dispose();
    }

  • How do I register for the timeout Event dynamically

    hello,
    I found this example:
    http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/dynamic_modifying_reg/
    I want to do the same thing, except that it's not the mouse move event that I want to toggle (register/unregister) but the timeout event.
    The timeout is in the drop down list of events I can register for, but it is greyed out.
    How can I do this?
    thanks
    Solved!
    Go to Solution.

    Use a shift register to hold what your timeout should be.  Use -1 for never time out.  Wire the value in the shift register to the timeout input on the Event Structure.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Custom event not traced in the SWEL transaction

    Hi Experts,
                In my development server I have created a custom BOR ZBUS2078 with few custom events and delegate it to the standard BOR BUS2078.
    I have moved the same to quality. But i could not find the trace for the custom events of ZBUS2078 unlike the standard events of BUS2078 in the SWEL transaction .
    However those custom events are getting triggered in my development server.
    I have checked the delegation and the custom BOR in the quality and they are same as in development server
    Object type : BUS2078
    Delegation type : ZBUS2078
    What could be the problem  and how to resolve it?
    Please provide your valuable solution and suggestions.
    Thanks in Advance.
    Regards
    K Arasu

    Issue resolved. I have maintained those custom events in SWEC in quality server.

  • Custom Events are repeating with the standard events

    Hello All,
    I am facing a problem with the customization of standard OA Page.
    We have modified the page by adding a new custom region with three buttons in it. We have also developed a controller for that region to handle the events. when a button is clicked, a new page opens up in a new window.
    I have observed that the custom controller is called when any event occurs in the page irrespective of the region.
    Now the actual problem is whenever any of the custom buttons are clicked, according to the requirement the new window opens up. But if we perform any other standard events in the page like clicking a standard LOV immediately after performing the custom event, then that most recent custom event is repeating with that standard event.
    how to prevent this repetetion of custom event with standard event?
    please help me solve this problem..
    Thanks in advance.

    For your page, are you setting the controller class for your various regions in the property inspector?

  • Custome Event for the Result Set iView

    Hi,
    does anybody know how to set up the Custom Event on the Result Set iView in order to trigger an event when a record is selected?
    I know how to do it using an event Type = EPCF + Event Name + Namespace, but this creates an extra colum on the Result Set iView with the Custom Event name on it, that has to be click in order to trigger the event. I do not want click on this column, i just want to create the event when the record is selected.
    Regards
    Diego.

    Hi Diego,
    We are also implementing similar scenario.
    We also want to open a window on the clik of any column of the result and if the result is zero we want to trigger some another iView.
    So if u have found any solution can u just let me know.
    OR else can u  just elaborate on ur current scenario using EPCF and custom event.
    Thanks in Advance.
    Regards Shruti.

  • Custom Event

    I need to communicate between two different controllers associate with different sections of FXML.
    I create a custom even and implemented an event handler in one of my controllers.
    I can not seem to figure out how to fire the custom event from my other controller. So far the documentation I have found doesn't fill in the blank about firing an event from a controller or even any other class than one that already has .fireEvent as a member.
    Am I using the wrong design pattern here or is there an easy solution to fire an event?
    pseudo
    public class myEvent extends Event {
         private static final long serialVersionUID = 1261846397820142663L;
         public static final EventType<myEvent >MY_EVENT = new EventType<myEvent >(ANY, "MY_EVENT");
         public myEvent (EventType<? extends Event> arg0) {
              super(arg0);
              // TODO Auto-generated constructor stub
         public myEvent () {
              this(MY_EVENT);
    public class myClass implements EventHandler<myEvent> {
         @Override
         public void handle(TimelineDropEvent arg0) {
              // TODO Auto-generated method stub
              System.out.println("MyEvent");
    public class myOtherClass {
    //TODO what do I do here to fire an event
    }Obviously both of my sample classes also implement Initializable since they are controllers.
    In my event do I absolutely need serialVersionUID or is there another way to avoid the warning associated with removing it?

    Sorry for the delay. I had to create a Google Code project to host the example:
    http://code.google.com/p/sjmb/
    The source code for the message bus API is here:
    http://code.google.com/p/sjmb/source/browse/#svn%2Ftrunk%2Fsjmb%2Fsrc%2Fcom%2Foracle%2Fsjmb
    It essentially allows callers to subscribe to "message topics", which are simply Java types. Any time an instance of a given type is sent, subscribed listeners are notified. Any Java type can be used including enums, which provide a nice, type-safe way to define messages.
    An example demonstrating how to use the API is here:
    http://code.google.com/p/sjmb/source/browse/#svn%2Ftrunk%2Fsjmb%2Ftest%2Fcom%2Foracle%2Fsjmb%2Ftest
    The main application window presents a tab pane containing 3 identical tabs. Each tab's controller subscribes to a message of type com.oracle.sjmb.test.Message. Entering text in the text field and pressing the "Send Message" button sends a new message, causing the other two tabs to update the contents of their own text fields to match.
    The example application consists of the following files:
    Message.java - the message class
    MessageBusTest.java - the main JavaFX application class
    message_bus_test.fxml - FXML document containing the main scene
    tab.fxml - FXML document containing tab pane content
    TabController.java - tab content controller
    Javadoc and binaries are available here:
    http://code.google.com/p/sjmb/downloads/list
    Please note that this is an example only and is not an official part of any Oracle product. Let me know if you have any questions.
    Greg

  • PJC and Custom Event

    I'm trying to create a Forms PJC which extends VTextField. The PJC should have the added feature to be able to set a limit on the time allowed to receive all input characters. This is to force the user to use other input devices than keyboard, such as card reader. By looking at the Forms demos I was able to make my PJC work, but it can't raise a custom event to notify Forms of the timeout. Only if I extend the generic class VBean can I raise a custom event (dispatchCustomEvent). I have tried to use the VBean as a wrapper for a VTextField but it does not look and act like a textfield anymore. The timeout and custom event works, but I can't get the input value from Forms. I have tried instantiating a VBean inside a VTextField to raise the custom event but it never reaches the Form. So what to do?
    But when I extend VBean instead of VTextField I have problems getting something which looks and acts like a textfield.

    Hello,
    +1. Complete Forms Solution described in the Dynamic poplist in a multi-record item. thread.+
    This solution is based on dynamic list population with appropriate predefined record group (the number of such predefined record groups could be rather big --> 1 Continents*Countries.+
    Record Groups can be totally dynamic, so you don't need to have them pre-existing at runtime.
    Francois

  • Could some one explain to me how Custom Events work?

    I tried looking in the live docs and still it confused me, so
    then I went searching on the net and found this very lovely
    tutorial
    http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/
    but still it confused me. The part I am puzzled on the most is that
    when you create like a event that listens for when your mouse
    clicks something is setup like addEventListener(MouseEvent.CLICK,
    eventHandler) etc, etc. And when a mouse is clicked the event is
    triggered! but if the CLICK constant is just a a string value what
    is going on behind the scenes that tells it (lets say Flex is
    talking -->) "okay he/she specified the 'CLICK' constant so I
    guess this means I will make this event happen only when the mouse
    clicks on that particular object" and same with
    MouseEvent.DOUBLE_CLICK how does it know to trigger this event only
    when the mouse double clicks on a item. I want to make my own
    custom events that trigger a particular event based on what a
    object does, but I just don't understand how to set it up and
    implement it.

    HI,
    The hole concept of event dispatcher is that events get fired
    all the time, if there is someone listening to the event or not. In
    your own example, the CLICK event gets fired each time someone
    clicks on the object.
    When you add an event listener basically what you are doing
    is adding a function to a queue of functions that get executed each
    time a specific event is fired. This is very important to keep in
    mind from the object disposal point of view, since for the garbage
    collector to actually kill an object all reference to it must be
    eliminated, and this include the reference in this queue for the
    listening function.
    The reason that an event name is simply a String is so you
    can actually define any event you might like. Still is good
    practice to define constants for your events names since it will
    avoid a lot of errors when writing code.
    Now to fire an event all you need to do is dispatch a
    specific event using the "dispatchEvent" function. This is what
    happens each time you click on an object, the dispatchEvent(new
    Event(Event.CLICK))) function is called.
    If you are using custom events it's a good idea to extend the
    Event class so you can add some extra information to the event, for
    example, in the MouseEvent the x and y coordinates of the mouse are
    added. To dispatch a custom event all you do is call the event
    dispatcher with the custom event:
    dispatchEvent(new CustomEventClass(Some Data));

  • Dispatching Custom Events Help

    Hello Everyone,
    I am just learning how to handle custom events, and after spending couple of days tring to understand the process, I am unable to get it going. What I am trying to do is to write a Two Button (component/swf). So when I need to utilize this component in other projects, I can simply load the the swf and be able to fire the buttons.
    I have two button objects on the stage, and I would like these two button object to fire custom events when the parent component is loaded as swf in other projects. Perhaps, I am going all wrong about what I am tring to accomplish here, I would highly appreciate your help.
    After some research, I concluded that I will need to employ Custom Event(s) going for my component. I spent hours on google and have not been able to get it working.
    Here is my code:
    ============================
    CustomEvent Class
    ============================
    package com.custom.apps
        import flash.events.Event;
        public class CustomEvent extends Event
            public static const CUSTOM:String = "custom";
            public var arg:*;
            public function CustomEvent(type:String, customArg:*=null, bubbles:Boolean=false, cancelable:Boolean=false)
                super(type, bubbles, cancelable);
                this.arg = customArg;
            public override function clone():Event
                return new CustomEvent(type, arg, bubbles, cancelable);
            public override function toString():String
                return formatToString("CustomEvent", "type", "arg",    "bubbles", "cancelable", "eventPhase");
    ============================
    DISPATCHING THE EVENTS
    ============================
    import com.custom.apps.*;
    btn.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(e:MouseEvent):void
        dispatchEvent(new Event(CustomEvent.CUSTOM, customHandler));
        //trace("FIRED");
    function customHandler(e:CustomEvent):void
        trace(e.target);
        trace('hello');

    Kalisto,
    I appreciate your help. Do I have this right? So I can build a navigation component with two links:
    LINK1 | LINK2
    then I load this navigation component/swf into another project and when I click on either of the links, it will dispatch a CUSTOM EVENT and when the event is dispatched, lets say I have a  function (sayHello) listening for that particular event and when the CUSTOM EVENT is dispatched when one of the navigation component's link is clicked the (sayHello()) function would fire itself.
    Can this be done? Am I on the right track?
    I have been at it for couple of days now, I am able to dispatch the event but don't know how to have a function listen for the events. I would highly appreciate it if you can have look at my code.
    Thanks a lot

  • Can you edit or add a custom event to contacts to show in Birthday Subscription calendar

    I want to modfy Birthday subscription calendar to include custom events that appear in my Contacts. Is there a way to do this?
    Or how can I create a new subscription calendar to be published in my iCloud acct pulling the custom events from Contacts?

    You have some contacts with more than one birthday?
    To add a custom label for a date, select Edit for an existing contact. Select Add Field. Select Date. Scroll up with the Info window above the date selection and select Other for the new date selection. Select Add Custom Label and then select this label for the new date field for the contact.
    As far as linking dates with multiple contacts, the answer is no to that.

Maybe you are looking for

  • Error in downloading a file

    Hi Experts, I have a program that can download an excel. Using 'WS_DOWNLOAD' I have specified the right parameter. I separated the fields using ",". Filename =  C:\TEMP\TEST.CSV    Data_Tab = D,S,00000000,ADJUSTMENTS,,,,,,         0.0000,         0.0

  • Safari 4.0.5 OSX & Windows

    I have both Safari 4.0.5 for Windows and Safari 4.0.5 under OSX 10.5.8. I have one site that displays a Flash page peel ad using IE and Safari 4.0.5 for Windows, but the same site does not display the page peel ad using Safari 4.0.5 OSX (although oth

  • Matrix with LinkButton refer to different Table

    how to build something like SBO Incoming Payments Matrix? means: 1. it display Docnum but it can refer to DocEntry 2. it can refer to different table (if Document Type is IN it refer to A/R Invoice, CN refer to A/R Credit Notes) thanks

  • Firefox wont open periode

    firefox is the only browser on my laptop have no way to fix it firefox wont open periode so please how can i fix the probleme

  • Cleaning up computer so I can sell it

    I want to sell my 2 and 1/2 year old laptop and need to wipe it out so it's like brand new. I know how to wipe out the hard drive and reinstall it but normally it will ask you to set it up with your apple id. I can't remember if that's something I ca