How to Capture Button event on TrainBean navigation

Hi All
i m being required to capture a button event in train bean Navigation, i m doing customization in Iexpense Module,here in Create IExpenseReport i need to capture the events of Remove,Return etc.how is it possible any clue would be very helpful.
Thanx
Pratap

try this..
if (GOTO_PARAM.equals(pageContext.getParameter(EVENT_PARAM))
"NavBar".equals(pageContext.getParameter(SOURCE_PARAM))
// This condition checks whether the event is raised from Navigation bar
// and Next or Back button in navigation bar is invoked.
int target = Integer.parseInt(pageContext.getParameter(VALUE_PARAM));
// We use the parameter "value" to tell use the number of
// the page the user wants to visit.
String targetPage;
switch(target)
case 1: targetPage = "/oracle/apps/dem/employee/webui/EmpDescPG"; break;
case 2: targetPage = "/oracle/apps/dem/employee/webui/EmpAssignPG"; break;
case 3: targetPage = "/oracle/apps/dem/employee/webui/EmpReviewPG"; break;
default: throw new OAException("ICX", "FWK_TBX_T_EMP_FLOW_ERROR");
HashMap pageParams = new HashMap(2);
pageParams.put("empStep", new Integer(target));
pageContext.setForwardURL("OA.jsp?page=" + targetPage,
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
pageParams,
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
OAWebBeanConstants.IGNORE_MESSAGES);
--Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How to capture the event in ALV grid display?

    Hi experts,
      How to capture the event in an ALV grid display which is editable. I have to capture the TAB key or ENTER key.
    regards,
    Arul Jothi.

    Hi Arul,
    Take a look at sample program BCALV_EDIT_03. (Find string "register ENTER" in the program to see how to register)
    Basically you have to Register edit events using method call REGISTER_EDIT_EVENT and then write a handler method for event DATA_CHANGED..
    If you are using a REUSE..GRID fm then first get the grid reference using function module GET_GLOBALS_FROM_SLVC_FULLSCR and then repeat the above procedure..
    Hope this helps..
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • Unable to capture button event in pageLayout Controller

    Hi Guys,
    I have the following layout
    pageLayout
    pageLayoutCO (controller)
    ----header (Region)
    ----------messageComponentLayout (Region)
    -----------------MessageLovInpurt
    -----------------MessageChoice(Item)
    -----------------MessageTextInput
    -----------------MessageLayout
    ----------HideShow (Region)
    -----------------MessageLovInpurt(Item)
    -----------------MessageChoice(Item)
    -----------------MessageTextInput(Item)
    -----------MessageComponentLayout (Region)
    -----------------MessageLayout
    ------------------------SubmitButton(ID:SearchBtn)
    ------------------------SubmitButton(ID:ClearBtn, fires partial action named clear)
    -----------header(Region)
    I am not able to capture the event fired by the button ClearBtn in the controller of the pagelayout.....
    The two methods I used as follows aren't worked:
    if ("clear".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    if (pageContext.getParameter("ClearBtn") != null) {
    what should i do in order to capture the button event in the pageLayout Controller
    Thanks in advance
    Mandy
    Edited by: user8898100 on 2011-8-2 上午7:49

    Mandy,
    Its really strange that its not able to caputure the event in CO.
    Below is the way in which we handle to Submit action at CO level.
    /Check whether ClearBtn is same in case too.
    if(pageContext.getParameter("ClearBtn")!=null){
    System.out.println("Inside the Clear Btn Action");
    Regards,
    Gyan

  • How to capture the event in driver JSplitPane

    Hi all, i have some problem with the JSplitPane.
    What i want to do is that:
    i need to capture the event throw when the user press the button in the driver of the JSplitPane, this is because i want to know wich side of the splitpane is complet visible.
    Thanks for your time!
    Luca

    I thought I would do up an example just for fun. As you drag the splitter bar the size of the two components and the splitter component is reported to the console along with the divider location. Interestinly, on my system (Windows XP, Java 1.41_02) when you move the bar downwards the divider location is consistantly two pixels past the height of the top component but when you drag the bar upwards the divider location and the height of the top component are the same.
    Does anyone have any ideas why that would be?
    Here is the test app:package splitPaneMonitor;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import javax.swing.JFrame;
    import javax.swing.JSplitPane;
    import javax.swing.JTextArea;
    public class SplitPaneFrame extends JFrame implements PropertyChangeListener  {
         public SplitPaneFrame()  {
              super ("Split pane test");
              //  Create the components to show in the split pane
              myTopComponent = new JTextArea ("This is the top component", 10, 40);
              myBottomComponent = new JTextArea ("This is the bottom component", 15, 40);
              //  Create the split pane
              mySplitter = new JSplitPane (JSplitPane.VERTICAL_SPLIT , true, myTopComponent, myBottomComponent);
              mySplitter.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, this);
              getContentPane ().setLayout(new BorderLayout ());
              getContentPane ().add (mySplitter, BorderLayout.CENTER);
         public void propertyChange (PropertyChangeEvent evt) {
              if (evt.getPropertyName () == JSplitPane.DIVIDER_LOCATION_PROPERTY)  {
                   System.out.println ("Split pane divider moved");
                   Dimension size = myTopComponent.getSize ();
                   System.out.println ("    The top component's size is: " + size.height +" h, "+ size.width + " w");
                   myBottomComponent.getSize (size);
                   System.out.println ("    The bottom component's size is: " + size.height +" h, "+ size.width + " w");
                   mySplitter.getSize (size);
                   System.out.println ("    The splitter's size is: " + size.height +" h, "+ size.width + " w");
                   System.out.println ("    The splitter divider location is: " + mySplitter.getDividerLocation ());
         private JTextArea myTopComponent;
         private JTextArea myBottomComponent;
         private JSplitPane mySplitter;
         public static void main(String[] args) {
              SplitPaneFrame appFrame = new SplitPaneFrame ();
              appFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              appFrame.pack();
              appFrame.setVisible (true);          
    }

  • Not able to capture button event in extended controller

    Hi Gurus,
    I am not able to capture the button event (of seeded controller) in extended controller.
    I have written code in extended controller like below:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){
        String str = pageContext.getParameter("event"); // copied from seeded controller for the button event //
          if ("editLines".equals(str)) {
            //cutom validation
      super.processFormRequest(pageContext, webBean);
    Please help me in resolving the issue.
    Thanks,
    Srinivas
        ///my cutom validateion

    Hi Bm,
    Thanks for your response.
    I have tried the same but no luck.
    Please help in getting this resolved.
    Thanks,
    Srinivas

  • Not able to capture button event in pageLayout Controller

    Hi Guys,
    I have the following layout
    pageLayout ------------------------ pageLayoutCO (controller)
    ----messageComponentLayout (Region)
    ----------messageComponentText (item)
    ----------messageComponentText (item)
    ----------messageComponentText (item)
    ----------messageLayout (Region)
    ----------------header(Region)
    ----------------------button (item) (say BTN1) (fires partial action)
    I am not able to capture the event fired by the button BTN1 in the controller of the pagelayout..... but if i set a controller at the messageComponentLayout iam able to capture the event.
    what should i do in order to capture the button event in the pageLayout Controller
    Thanks in advance
    Tom.

    Tom,
    Two things:
    1)The button ur using is of type submitbutton or button?.In this scenario it should be button.
    2)The correct coding practice is using:
    if("QUERY".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    instead of
    String _event = pageContext.getParameter("event");
    if("QUERY".equals(_event))
    because you never know if Oracle in any upgrade or patch change the value of the constant EVENT_PARAM in class OAWebBeanConstants.
    3)If first point is followed by you, just match the exact event name in code and in property inspector for the button.
    --Mukul
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to Capture Print Event ??

    Post Author: aarayas
    CA Forum: General
    Hi, I need Capture Print Event(), for report.In the the list to event from  crystal report viewer not have event to print?? sorry for my bat english, i speak spanish; tranks, 

    If there's no error being thrown by this function when you cancel the
    printing, then you can't.
    Edit: Just checked, and there isn't.

  • How to Capture the event when minimized button is clicked of a JFrame?

    Hi All,
    In my SWING application, I want to do something when the minimized button is clicked. But not able to understand how to do that.
    My basic requirement is like that, if I minimize the JFrame, it should be minimized to system tray with an icon. Again when the icon is clicked, the frame should be maximized in the Windows.
    Also, how to make my JFrame visible/invisible. If I close it, then the process will got killed... that I don't want to happen. Should I us setVisible(true/false) for the frame... Please suggest...
    Thanks,
    Ujjal

    There could be some mistake in my basic understanding... Anyway this is what I wrote...
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    public class WindowIconify extends JApplet
         JFrame jf;
         JPanel jp;
         public void run()
              jf = new JFrame("test");
              jf.setSize(200,200);
              jp = new JPanel();
              jp.setBackground(Color.BLACK);
              jf.add(jp);
              jf.setVisible(true);
         public boolean handleEvent(Event event)
              if ( event.id == Event.WINDOW_ICONIFY)
                   System.out.print("iconifying");
              return true;
         public static void main(String args[])
              WindowIconify wi = new WindowIconify();
              wi.run();
    }

  • How to capture Button Click in OAF

    Hi All,
    I have created a button "TestButton" using personalization. On the click of this button, a new page "TestPG" opens. But i have to pass a few parameters from the old page to the new page. How do i capture this button click event in the CO so that i can use the pageContext.forwardImmediately method to pass the parameters?
    Also, what is the difference between a Button and a SubmitButton?
    Regards,
    Shreyas

    I never tried this... But can suggest you something.....
    Create a Upload type of item in your region, which will allow you to browse your Image file.
    Attach a VO attribute which will be based on EO. VO attibute will be based on Databse column of BLOB type, which will store the image in DB.
    If you want to transfer this file to application server's any directory, you can do that also.
    But above is solution to your problem..

  • FPM : how to subscribe buttons event for Dialog box

    Hi All,
    I am calling a FPM configuration as popup, i have used standard button CLOSE. Now I wanted to assigned my own action to it. How can i achieve this ?
    As in webdynpro we can use  SUBSCRIBE_TO_BUTTON_EVENT, similarly which method i can use in FPM ?
    E.g. in below case i wanted to write my own code on click of OK button.
            LS_DB_PROP-BUTTON_SET = 2.
             LS_DB_PROP-TEXT_FOR_CLOSE_BUTTON = 'Ok'.
             CALL METHOD LO_FPM->OPEN_DIALOG_BOX
               EXPORTING
                 IV_DIALOG_BOX_ID         = LV_WINDOW_ID
                 IS_DIALOG_BOX_PROPERTIES = LS_DB_PROP
                 IO_EVENT_DATA            = LO_FPM_EVENT_DATA
    *           IV_EVENT_ADAPTS_CONTEXT  =
    Thanks in Advance,
    P$G

    Hi Prathamesh,
    Refer to this Opening and Closing FPM Dialog Boxes which might help you.
    For catching the event :
    When cl_fpm_event=>gc_event_close_dialog_box.
           io_event->mo_event_data->get_value(
             EXPORTING
               iv_key   = 'DIALOG_BUTTON_ACTION'
             IMPORTING
               ev_value = lv_string
           IF lv_string EQ 'CLOSE'.
    Write logic here
         endif.
    Hope it might help you.
    Thanks
    KH

  • How to capture the event on changing focus from a JTextField?

    Hi All,
    I have got a problem...
    I want to do something (say some sort of validations/calculations) when I change the focus by pressing tab from a JTextField. But I am not able to do that.
    I tried with DocumentListener (jtf01.getDocument().addDocumentListener(this);). But in that case, it's calling the event everytime I ke-in something in the text field. But that's not what I want. I want to call that event only once, after the value is changed (user can paste a value, or even can key-in).
    Is there any way for this? Is there any method (like onChange() in javascript) that can do this.
    Please Help me...
    Regards,
    Ujjal

    Hi Michael,
    I am attaching my code. Actual code is very large containing 'n' number of components and ActionListeners. I am attaching only the relevant part.
    //more codes
    public class PaintSplitDisplay extends JApplet implements ActionListener
         JFrame jf01;
         JPanel jp01;
         JTextField jtf01, jtf02;
         //more codes
         public void start()
              //more codes
             jtf01 = new JTextField();
              jtf01.setPreferredSize(longField);
              jtf01.setFont(new Font("Courier new",0,12));
              jtf01.setInputVerifier(new InputVerifier(){public boolean verify(JComponent input)
                   //more codes
                   System.out.print("updating");
                   jtf02.setText("updated value");
                   System.out.print("updated");
                   return true;
              //more codes
              jtf02 = new JTextField();
              jtf02.setPreferredSize(mediumField);
              jtf02.setEditable(false);
              jp01.add(jtf02, gbc);
              //more codes
              jf01.add(jp01);
              jf01.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              jf01.setVisible(true);
              //more codes
         public static void main(String args[])
              PaintSplitDisplay psp = new PaintSplitDisplay();
              psp.start();
         public void actionPerformed(ActionEvent ae)
              //more codes
    }As you can see I want to update the second JTextField based on some calculations. That should happen when I change the focus from my frist JTextField. I have called jtf02.setText() method inside InputVerifier. But it's giving error...
    Please suggest...
    Ujjal

  • How to capture Flash SWC events?

    Can someone point me in the right direction on how to capture an event from a Flash SWC in Flex?
    Scenario:
    I have an animated gameboard that I built in Flash. Nothing fancy, just a simple tile game where you select a tile, click it and it flips over to reveal something.
    I've managed to export a SWC, and get it to display just dandy in my Flex project, but I cannot figure out how to get Flex to capture and respond to any type of event... custom or predefined (such as MouseEvent.CLICK) when clicking one of the tiles in the swc.
    I've done quite a bit of googling but I'm cross-eyed at this point and could use some expert direction.
    Thanks in advance.
    JL

    Hi Alex,
    After further research, I've found some answers to my questions, but I've encountered a related obsticle.
    I finally stumbled upon the Flex 3 Component Kit documentation, and on page 9 of that document, it describes in detail an example of adding custom events.
    To summarize, my related obsticle this:
    I created a simple MovieClip symbol in Flash (named "My Circle").
    I created a simple external class mimicing the example code in the Flex 3 Component Kit documentation (named "MyCircle.as") which extends mx.flash.UIMovieClip
    The .fla containing the MovieClip symbol "My Circle" and the external class "MyCircle.as" reside in the same directory
    In Flash I convert the symbol "My Circle" to a Flex component and verify that the class is "MyCircle" and there is no base class
    I export the now converted MovieClip as a .swc file
    In my Flex project, I add MyCircle.swc to the Library path
    In my Flex project source I add an instance of MyCircle as <local:MyCircle id="my_circle" />
    Switching to Design view in my Flex project I don't see anything. I refresh design view and still do not see a graphic representation of my .swc file. There are no errors or warnings
    Using the Outline, I select the instance of MyCircle and discover that it is indeed on the stage, but it's bounding box dimensions are essentially zero. It seems there is no image in the swc.
    Returning to Flash, I duplicated the MovieClip symbol, renamed it to "My Circle No External Class", and converted it to a Flex component. I also verified that this new component had a class name of "MyCircleNoExternalClass" and had a base class of mx.flash.UIMovieClip.
    Following the above proceedure to correctly link it to my Flex project's Library path and adding an instance of <local:MyCircleNoExternalClass /> to the source, the .swc file show's up beautifully.
    So, why would adding an external class file (with the ultimate goal of being able to dispatch custom events) cause the contents of the MovieClip itself to not be included in the .swc?
    Again, I'm following the example on page 9 of the Flex 3 Component Kit documentation and using the Flex 3.3 SDK.

  • Does anyone know how to capture a menu event on a existing EXE program?

    I have figured out how to add menu Item to an existing EXE program, but I have not yet been able to figure out how to capture there events.  Any help would be greatly appreciated.

    "[email protected]" <[email protected]> wrote in message news:[email protected]..
    I have figured out how to add menu Item to an existing EXE program, but I have not yet been able to figure out how to capture there events.&nbsp; Any help would be greatly appreciated.
    It's not entirely clear what you are trying to acieve. I think you're trying to add menu items to an exsisting exe without recompiling it, from LabVIEW. If so the following applies.
    You have to hook the winproc. When a menu item is selected, windows send a message to the window's winproc. There are some API's that can be used to point the address of the winproc to another routine. This routine can do filtering, and then call the original routine.
    Note that LabVIEW doesn't (or didn't until LV7) use windows menu's, so when a LabVIEW (or exe created with LabVIEW) menu item is called, windows will not send anything. That is the price for platform independency.
    I think the OpenG site (or perhaps Winutils from NI) has some vi's to hook windows messages that are send to LabVIEW. Perhaps you can also use them hook another application.
    Regards,
    Wiebe.

  • Handling Button Event

    Hi all,
    i am using a 'When-Validate-item' trigger in this i am doing a validation,
    when user try to enter amount greater than the given amount(This is needed validation)
    and also i am regenerating new lines(Creating new records when button pressed)
    when i am regenerating i should not validate.
    How to handle button event
    Thnx
    Raj

    Hi...
    The WHEN-VALIDATE-ITEM Trigger fires once you updated a field. Be sure you raise
    form_trigger_failure when amount is invalid. So, the cursor stays in field amount. You cant
    leave this field until the amount is not valid.

  • Capturing Mouse Events On MediaPlayer

    Hi,
    I have created a video conference application based on JMF. In this application I am using MediaPlayer control to play the rtp stream. Now I want to capture Mouse Events like MouseClick and MouseMove. But sorry to say that I am not getting any event on MediaPlayer control. I have tried this on other controls and successful. Can anybody tells me how to capture mouse events on MediaPlayer.
    --ibrar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Mouse Events may only be capture INSIDE the java application frame. SO, if your desktop is not a java component, you will not be able to capture the events.
    However, you could maybe use JNI to use native methods so as to get the location of the mouse...
    vincent

Maybe you are looking for

  • Problems with using the singlewrite function (in the CWDIO control)

    Hi, I'm using an old nidaq card (PCI 1200) with nidaq 6.9 (the card is not supported after this version). I'm using a CWDIO control to send regularly orders to an other card (an order every 50 ms for example) using these lines of code : CWDIO1.Ports.

  • Display Program output in PDF format using Webdynpro

    Hi all, I have a requirement which is as follows: I need to create Webdynpro with ABAP application which should internally call a program. There will be selection screen for the program but that should not be shown and program should be executed for

  • Where is located application uploader?

    Hi Just downloaded and installed application uploader, but I can't find executable on Mac HD Does anyone knows how to launch application? Thanks a lot in advance

  • Actiontec MI424-WR Rev. E and Windows 8

    Will this router I have funtion with W8. Thanks

  • Captcha on the way?

    Hi, I was really interested with your product however, Captcha must be on the way as an option in your form product for it to be a serious contender with other software we use? Peter