OVS - intercept listener event

Hi All,
Is there any way to intercept the click event on the OVS of an Input-Field?
I am not intersted in applying the OVS++ scenario, instead I wish to run my own code.
Aviad

Aviad,
When you follow the steps for OVS, in the process you map view context to OVS custom controller. And during runtime, since this attribute is mapped to OVS context, you get the input help button for the input field.
I dont think you'll get that if you dont use OVS at all.
And the event (when you click on that input help) is handled by an internally (hidden from the developer) implementation of WDValueServices or some other class.
So, AFAIK, the short answer is no.
Sorry I couldnt be of more help.
Regards,
Rajit

Similar Messages

  • Listener event

    I am trying to create a small game got most of the functionality, apart from one aspect how would you code an Listener event that would take into account that if any two pawns on a chessboard were on the same line in any direction then that row would become highlighted and the user could not place any more pawns on that row?
    I know a wee bit about �if� and �else� statements but I have no idea how you would create code that would carry out the above function.
    Any help would be great
    Tom
    // <applet code="ChessBored.class" width="500" height="500"></applet>
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ChessBored  extends JApplet
      public void init()
         JFrame f = new JFrame("Chess Board");
         ChessBoard board = new ChessBoard();
         f.getContentPane().add(board);
         f.setSize(board.WIDTH, board.HEIGHT);
         f.setVisible(true);
       } // end init
      public class ChessBoard extends JPanel implements MouseListener
        private Color[] squareColor = new Color[2];
        private final int NUMSQUARES = 8, WIDTH = 400, HEIGHT = 400;
        private int squareSize;
        private int boardSize;
    /* The constructor sets only some of the instance variables.
       The rest are set when the screen is painted.
       public ChessBoard()
          squareColor[0] = Color.black;
          squareColor[1] = Color.white;
          addMouseListener(this);
          setSize(WIDTH, HEIGHT);
    /* The paintComponent method is called every time the display
       needs to be repainted. Examples: When the window is
       first displayed, when the window is moved, resized,
       maximized, etc.
       Draws an 8x8 grid of alternately colored squares.
       Make the grid as large as it can be to fit in the
       current size of the drawing pane (which is the content pane
       for the JFrame).
        public void paintComponent (Graphics g)
          super.paintComponent(g);  // Make sure background is cleared
          int paneHeight = this.getHeight();
          int paneWidth  = this.getWidth();
          if (paneHeight < paneWidth)
            squareSize = paneHeight / NUMSQUARES;
          else
            squareSize = paneWidth / NUMSQUARES;
          boardSize = squareSize * NUMSQUARES;
          for (int row=0; row<NUMSQUARES; row++)
             for (int col=0; col!=NUMSQUARES; col++)
            { g.setColor(squareColor[(row+col)%2]);
              g.fillRect(col*squareSize,   // x
                         row*squareSize,   // y
                         squareSize,       // width
                         squareSize);      // height
        } // end paintComponent
    /** The mouseClicked method responds to any mouse clicks.
        public void mousePressed(MouseEvent e)
    // Quit if the mouse press falls outside the board
          Point p = e.getPoint();
          int x = (int) p.getX();
          int y = (int) p.getY();
          if((x>boardSize) || (y>boardSize))
            return;
    // Determine which square (i.e. row, col) was selected
          int row = y / squareSize;
          int col = x / squareSize;
          if (row <= 8)
            drawPawn(row, col, Color.blue);
        //else
          //if (row >= (NUMSQUARES-2))
            //drawPawn(row, col, Color.black);
          //else
           // drawMessage(row, "Checkmate!");
    /* These four methods are not used, but must be
       implemented because they are required by the
       MouseListener interface.
        public void mouseEntered(MouseEvent e)  {}
        public void mouseExited(MouseEvent e)   {}
        public void mouseClicked(MouseEvent e)  {}
        public void mouseReleased(MouseEvent e) {}
    /** The drawPawn method draws a pawn shape on the
        specified square in the chess board.
        public void drawPawn(int row, int col, Color c)
          Graphics g = this.getGraphics();
          g.setColor(c);
    // Calculate position of upper left corner of square
          int x = col*squareSize;
          int y = row*squareSize;
    /* Draw circle for "head" of the pawn. Dimensions are
       for the oval's "bounding box".
          g.fillOval(x+(2*squareSize/5), // x
                     y+(squareSize/5),   // y
                     squareSize/5,       // width
                     squareSize/5);      // height
    // Draw a polygon for the "body" of the pawn.
          Polygon body = new Polygon();
          body.addPoint(x+(2*squareSize/5),
                        y+(2*squareSize/5));
          body.addPoint(x+(3*squareSize/5),
                        y+(2*squareSize/5));
          body.addPoint(x+(4*squareSize/5),
                        y+(4*squareSize/5));
          body.addPoint(x+(squareSize/5),
                        y+(4*squareSize/5));
          g.fillPolygon(body);
        } // drawPawn
    /** The drawMessage method draws the given string in
        the given row of the chess board, centered
        horizontally.
        public void drawMessage(int row, String s)
    //Set a new font and color
          Font bigFont = new Font("Times New Roman", Font.BOLD, 36);
          Graphics g = this.getGraphics();
          g.setFont(bigFont);
          g.setColor(new Color(0.8F, 0.8F, 1.0F));
    //Determine the position of the string
          FontMetrics m = g.getFontMetrics();
          int x = (boardSize - m.stringWidth(s)) / 2;
          if (x < 0)
            x = 0;
          int y = ((row+1)*squareSize) - m.getDescent();
          if (y<0)
            y = m.getLeading() + m.getAscent();
          g.drawString(s, x, y);
        } // drawMessage
      } // end ChessBoard
    } // end ChessBored

    One thing that sticks out is your listener method isn't quite to spec, according to the f:ajax spec they're supposed to match the following signature:
    javax.el.MethodExpression
    (signature must match public void processAjaxBehavior(javax.faces.event.AjaxBehaviorEvent event) throws javax.faces.event.AbortProcessingException)
    Try dropping the boolean return value & adding the throws. I'm running Apache's MyFaces and it's perfectly fine with your method signature, but maybe your JSF implementation isn't.
    Also, you running with javax.faces.PROJECT_STAGE set to Development? Maybe some useful server-side error you're not seeing. You probably should also create your own ExceptionHandler to dump stack traces to the console/logs if you haven't done so already as well.
    And lastly, you sure all your code's published to the server? If you're still stuck, then the best thing to do is to make this page as simple as possible, put just 1 checkbox w/o all the table/repeats/etc. to help you eliminate other possibilities.
    Sorry can't be more helpful...

  • Listening events for numeric keys

    Hi,
    How can I listen events for numeric keys without using Canvas?
    I mean I would like to take some actions when user writes something
    on a TextField. My main class is not inherited from Canvas and because of that
    I can't use keyPressed() method to handle these numeric keys.
    Is there a way to handle these events in commandAction() method?

    Hi,
    If u r concerned only about the texfields and if you are using MIDP 2.0 compatible device then try ItemCommandListener.

  • How to intercept all events sent to subcomponents of a JFrame

    Hello.
    The title says everything, i think.
    I need to make a gui where there would be a user validity timeout if no action is done during a certain period. (then, a modal dialog would show up, asking for a login/pass).
    I could do that by modifying each and every swing components to have some date of last use" data, and a thread in the window, bla bla bla... but this is too heavy and crappy to me.
    What i would like to do is intercept all events, note the date, and send them normally to who they were sent to originally.
    Has anyone an idea?

    okay, i've succeeded...
    here is the source, in case some ever encounter the problem:
    public class TimeoutGlassPane extends javax.swing.JComponent
         java.awt.Component     here=this;
         /** Creates a new instance of TimeoutGlassPane */
         public TimeoutGlassPane()
              addMouseListener(new javax.swing.event.MouseInputAdapter()
                   public void mouseClicked(java.awt.event.MouseEvent e)
                        dispatch(e);
                   public void mousePressed(java.awt.event.MouseEvent e)
                        dispatch(e);
                   public void mouseReleased(java.awt.event.MouseEvent e)
                        dispatch(e);
                   void dispatch(java.awt.event.MouseEvent e)
                        java.awt.Component component = javax.swing.SwingUtilities.getDeepestComponentAt(((javax.swing.JRootPane)getParent()).getLayeredPane(),e.getX(), e.getY());
                        java.awt.event.MouseEvent mouseEvent=javax.swing.SwingUtilities.convertMouseEvent((java.awt.Component)(e.getSource()), e, component);
                        component.dispatchEvent(mouseEvent);
         protected void paintComponent(java.awt.Graphics g)

  • Help Please ... with calling functions inside listener events

    I need the window to update itself before another method inside my listener is called. When I make the call to updateUI() it preforms it's function once my listener event is compelete while I would like to to happend.
    paw.updateHasMoved();
    temp.updateUI();// -->Want the update to occure before the next line is called
    piece.CB.board = ComputersMove(piece.CB.board);

    okidoi Mr Helpy!
    let me try with this
    just one more question, the button should be created at
    runtime or inside my
    movieclip?
    Regards
    Rick
    "Mr Helpy mcHelpson" <[email protected]>
    escribió en el mensaje
    news:f46tjk$lg1$[email protected]..
    > flooring.onLoad = function(success) {
    > if (flooring.firstChild.hasChildNodes()) {
    >
    > you can just do
    >
    > flooring.onLoad = function(success) {
    > if (success) {
    >
    > you'll need to create a button on top of your image.
    This for me is most
    > easily done with a predefined custom class, and on the
    instantiation of
    > your
    > image(movieclip) you can define the button actions
    contained in the movie
    > clip.
    >
    > make sense?
    >
    > HmcH
    >

  • [JS - CS5] listen events on the title bar of a palette

    I want to listen click on the title bar of a palette.
    I use
    myWin.addEventListener ("click",myFunction);
    but it works only on the bounds area, not on the title bar.
    Is it possible to listen events on the title bar?
    thanks
    Ivan

    I want to listen click on the title bar of a palette.
    I use
    myWin.addEventListener ("click",myFunction);
    but it works only on the bounds area, not on the title bar.
    Is it possible to listen events on the title bar?
    thanks
    Ivan

  • Listening events in another class in a another folder

    Listening events in another class in a another folder
    Is there away of controlling a event from another location without being in the same directory/location.
    I've got a button made and a Event Action for the button made in two seperate classes. But I can't make them work without placing them both in the same location together.
    Any simple code that help communicate of long distances/folders.
    Thankyous.

    The "distance" should not be an issue, only visibility. The class that contains the button need to implement some public method of adding an ActionListener to the button. Of course the class that implements the action listener would have to have access to the instance of the button class to call that method.
    Class A {
    private JButton myButton;
    public void addActionListenerToButton (ActionListener listener){
       myButton.addActionListener (listener);
    }

  • Force to java to listen events

    My problem is this: when When i�m executing certain loop in my application, the JVM doesn�t listen the events that occurs (that is, the actionPerformed method isn�t invocated when i push a JButton). When the loop finished, the problem dissapear. �Anybody knows some call that force to java to listen events?. I�ve tried to implement this loop in a thread but the problem doesn�t dissapear.
    Thanks.

    if the loop is started from a gui event handler, take a look at SwingUtilities.invokeLater() method
    Nic

  • Listening events on another class

    Hi, I am doing a program that uses differents jpanels, So I need to set a button enabled when an event ocurrs in another panel, how can I do that. the problem is that the panel from wich I need to listen is another class.
    please can someone help me posting some small code that shows how can I listen events on other classes. I think I am able to detect it changing a static variable on another class and having a thread that verify its state, But i dont want to do that, I want to use a listener or any other similar way.

    there's a lot of ways so it depends on the architecture of your program.
    here's a couple of ideas to play with.
    import javax.swing.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    public class MyFrame extends javax.swing.JFrame {
        public MyFrame(AnotherClass a) {
            JButton b1 = new JButton("OK");
            b1.addActionListener(a);
            JButton b2 = new JButton(a.getButtonAction("Cancel"));
            getContentPane().setLayout(new java.awt.FlowLayout());
            getContentPane().add(b1);
            getContentPane().add(b2);
            setLocationRelativeTo(null);
            pack();
            addWindowListener(new WindowAdapter(){
               public void windowClosing(WindowEvent we){
                   System.exit(0);
        public static void main(String[] args){
            new MyFrame(new AnotherClass()).setVisible(true);
    import javax.swing.Action;
    import javax.swing.AbstractAction;
    import java.awt.event.*;
    public class AnotherClass implements ActionListener {   
        private Action a;//cancel action
        public AnotherClass() {}
        private void setEnabled(boolean b){
            a.setEnabled(b);
        //cancel action
        public Action getButtonAction(String name){
            a =  new AbstractAction(name){
               public void actionPerformed(ActionEvent ae){
                   System.out.println("Cancel");
            return a;
        public void actionPerformed(ActionEvent e) {
            //ok button action
            System.out.println("okay");
    }

  • How do i hide/cancel popup on fetch  listener event

    Hi,
    I have a popup.  popup should not be visible  if there is any database error
    raise on execution of procedure which call inside popup fetch listener

    hi user,
    I have a popup.  popup should not be visible.
    there is lot of ways to rendering or no rendering of popup. why you want to listener event?
    if there is any database error
    what you mean db error. what kind it is.
    raise on execution of procedure which call inside popup fetch listener
    I did not know about your requirement. by blindly read this i can't  able to come to conclusion.
    please give enough info about jdev? and usecase?. and so on.

  • Intercepting Windows event messages

    Is there an easy way to Intercept Windows event messages without having to write a dll to do it?
    The command that I looking to get is:
    WM_SYSCOMMAND
    I have a touch screen appliaction and I am tring to keep it from processing events when it is recovering from "sleep" mode. I need the screen to be on and no screen saver.
    Tim
    Johnson Controls
    Holland Michigan
    Solved!
    Go to Solution.

    This has probably already been handled by this request: http://forums.ni.com/t5/LabVIEW/Upconvert-VI-Requests/m-p/1402560#M546297

  • Intercepting key events

    I've searched the board already for this topic but didn't find an answer.
    My problem is the following: I have a JTextField which adds a KeyAdapter. The KeyAdapter overrides KeyPressed()
    I want to check when a user enters a character to see its a char and not an int. I'm already able to check this with the KeyAdapter, but when a key is an int, I don't want it displayed in the JTextField but that's what I don't know how to do. I tried e.consume() but that doesn't work. Can anybody help me please?

    Use a keyTyped listener instead, then event.consume() will happen before the character gets placed in the text component.. Plus, if I hold the key down, only ONE key pressed event happens, so the first one could go thru your check, but all the rest will just go in the text component regardless:
    Your event really is being consumed, it's just the order of events in the different listener methods. Comment out the different key listener methods and see for yourself:
    import javax.swing.*;
    public class Test extends JFrame{
        public static void main(String[] args){
            new Test().setVisible(true);
        public Test(){
         getContentPane().setLayout(null);
         setSize(615,414);
         setVisible(false);
            JTextArea JTextArea1 = new JTextArea();
         getContentPane().add(JTextArea1);
         JTextArea1.setBounds(110,165,280,70);
         SymKey aSymKey = new SymKey();
         JTextArea1.addKeyListener(aSymKey);
        class SymKey extends java.awt.event.KeyAdapter{
         //public void keyPressed(java.awt.event.KeyEvent event){
            //    event.consume();
         //public void keyReleased(java.awt.event.KeyEvent event){
            //    event.consume();
         public void keyTyped(java.awt.event.KeyEvent event){
                event.consume();
    }

  • How to intercept touchscreen events

    Hi,Everyone
    I can use RegisterRawInputDevices, Monitor global Touch events, but is there any way you can intercept it?
    I try to write a touch screen gestures Software , used to control the desktop environment does not support touch software.
    Anything that can Intercept method,please let me know.
    thanks.
    Another: When you touch the screen, the mouse cursor will move, how to Ban it?

    看你英语不是很好,我就直接用中文说了吧,拦截可以用RegisterPointerInputTarget这个API,可以拦截所有touch消息,但是拦截后原来的消息就没办法传递下去,这就只能用InjectTouchInput模拟输出,但是这个模拟又很蛋疼,只能模拟第二次输入,会造成很多问题。。。总之你慢慢用这两个API折腾吧。。

  • How to listen Events in subclasses

    Hello, I'll try to be as clear as possible.
    I've two AS2 classes, say Main and Sub.
    Sub inherits from Main.
    Main gets instantiated by Sub by calling super in its
    constructor.
    In Sub constructor a Main method gets invocated too.
    Being this Main method related to a remoting call, it
    automatically
    calls a fault or a result event when it receives data from
    the server.
    In the Result function I put:
    dispatchEvent({type:'myMessage', target:this});
    What I'm trying to do:
    this message should be listened by Sub.
    When Sub receives this event it should fire one of its
    methods.
    How to do this?
    Thanks!

    Sorry. This doesn't make sense. Please rephrase the question or try posting in your native language.

  • Dispatching and listening events in different swf in flex

    I have two swf files.
    1.Main Application swf file.
    2.Module swf file
    If i dispatch an event in main application swf file i am unable to listen in module swf file.
    Can any one propose me a solution for this.

    You can use this example:
       private function ready(event:ModuleEvent):void
        var c:UIComponent = event.currentTarget.child as UIComponent;
        c.addEventListener(events.system_events.MODULE_UPDATED, updated, false, 0, true);
    <mx:ModuleLoader id="mod" x="0" y="0" ready="ready(event);" error="load_error(event);" width="100%" height="100%" />

Maybe you are looking for

  • Sender Mail Adapter Error: exception caught during processing mail message;

    HI , I am configuring mail to file scenario. Need to read mail content (no need to capture From,TO or Subject details) and create a file with the content in the mail. Need to read mails from microsoft outlook. Exchange server has been configured for

  • Flag deletion date for customer

    Hello All, I have a requirement to get the flag deletion date for a customer on a sales organization level in a report, maintained in XD03/VD03 - Have written the below code. The problem with this is that the date is not fetched sometimes for a parti

  • APEX 5: Problem displaying breadcrum (Create) button on interactive report

    Hello There I am trying to build a small app in APEX 5. I am taking the default 'Sample Database Application' (SDA) as an example for design. In SDA the interactive report of Customer a breadcrumb 'Create which is displayed on the top right corner. I

  • Google Reader loads but doesn't display feed

    Using Firefox 10.0.2 with Mac Lion - It works with Safari and with Windows 7 using BootCamp. Newsfeed on Facebook also doesn't work.

  • IPad won't send mail

    Please can anyone help. I can receive email but not send. All server details are correct. No problem with iPhone.