Skip Enter Key and focus a field

Hi All
I need to :
1) skip pressing the enter key to refresh the screen after selecting a ralio button
2) focus a paticular field after selecting a radio button
Please tell me the tricks to perform these - I have looked up the help and SDN for these - but sofar - not much useful info found
Thanks in advance.

Hi Liem,
Refer below thread and in that see the link of help.sap.com
Re: Set Variant in Program
Regards,
Atish

Similar Messages

  • Problem while adding both Key And Focus Listeners to JTextField

    Hi!
    I have something peculiar while adding Key and Focus Listener to JTextField. Suppose i add just Key Listener then everything's fine and i could keep track of keys being pressed. But as soon as i add a Focus Listener to it with the code to select full text in focusGained() method, it starts reponding wrongly to arrow keys pressed and does not perform desired actions. For let arrow key it moves caret by one for the first time after that it does not resond to that unless caret is changed by using mouse. If right arrow key is pressed the it moves the caret to last position from wherever it is. For UP and DOWN it selects the full text(This should be done when it gets focus)
    public void focusGained(FocusEvent fe)
    setCaretPosition(0);
    moveCaretPosition(getDocument().getLength());
    Can someone help me out on this?
    thanks and regards,
    Amit.

    None of those things will cause your JFrame to resize itself. And this is probably a good thing, because your JFrame shouldn't change size once you have created it. Why not create your JPanel so that it has enough space for you to add the component later? Or why not just add the component to start with and then enable it or make it editable when you decide that's necessary?

  • Problem with Enter key and JOptionPane in 1.4

    Hi,
    I had a problem with an application I was working on.
    In this application, pressing [Enter] anywhere within the focused window would submit the information entered into the form that was contained within the frame.
    The application would then try to validate the data. If it was found to be invalid, it would pop up a JOptionPane informing the user of that fact.
    By default, pressing [Enter] when a JOptionPane is up will activate the focused button (in most cases, the [OK] button) thus dismissing the dialog.
    In JDK 1.3 this worked fine. But in JDK 1.4, this has the result of dismissing the dialog and opping it up again. This is because the [Enter] key still works on the frame behind the JOptionPane and thus tries to validate it again, which results in another invalid dialog msg popping up.
    The only way to get out is to use the mouse or the Esc key.
    Now, in the application I put in a workaround that I was not very happy with. So, to make sure it wasn't the application itself, I created a test which demonstrates that it still misbehaves.
    Here it is.
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.KeyEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JTextField;
    import javax.swing.KeyStroke;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    import javax.swing.WindowConstants;
    * @author avromf
    public class FocusProblemTest extends AbstractAction
         private static JFrame frame;
         public FocusProblemTest()
              super();
              putValue(NAME, "Test");
         public void actionPerformed(ActionEvent e)
              JOptionPane.showMessageDialog(frame, "This is a test.");
         public static void main(String[] args)
              FocusProblemTest action= new FocusProblemTest();
              try
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception e)
                   e.printStackTrace();
              frame= new JFrame("Test");
              frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
              Container contents= frame.getContentPane();
              contents.setLayout(new FlowLayout());
              JTextField field= new JTextField("Test");
              field.setColumns(30);
              JButton  button= new JButton(action);
              KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true);
              button.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(enterKey, "test");
              button.getActionMap().put("test", action);
              contents.add(field);
              contents.add(button);
              frame.pack();
              frame.setVisible(true);
    }Does anyone have any solution to this problem?

    I know that focus management has changed alot.
    Based on my experimentation a while back, in 1.4 it still believes that the JFrame is the window in focus, even though a JOptionPane is currently in front of it (unless I misinterpreted what was going on). Thus, the frame seems to get the keyboard event and re-invoke the action.
    A.F.

  • No enter key or focus w/firefox

    When testing with Firefox, my flash form doesn't allow the
    enter key or the scroll wheel to function. Not can I set focus on a
    particular field. That is, The field appears to be in focus, but
    the cursor is not set to that field. I have to click it first
    before I can type into it.

    On my MBP I can get "enter" by function-return.
    charlie

  • Enter key and GridControl !!

    I need to go to the next cell in the same row when Enter is pressed. Any ideas as to how to do it. By default pressing the Enter key will move the row selection down. I would like to change this.

    hi gina,
    as stated above if you have a text field and this is the only item on the page then the browser default behaviour is to submit the page if the user hits enter.
    if the search item is not the only item on the page then the browser will not submit the page but treat the item as a normal text item.
    so if you want the user to be able to submit the page by hitting enter after filling the field then use the item with submit item type.

  • Is it possible - "pust enter key" and "execute go button"

    Hi guys,
    I want to execute the go button when I push the enter key from keyboard...
    Is it possible?
    Regards.

    hi mate - i think i know what you're trying to do... you're trying to "set focus" on the GO button so on "enter" the go button automatically fires off.
    couple of problems with this (from what i see).
    1. if you have multiple prompts on the dashboard then you have more than one "GO" button to click on... which one should you default to?
    2. targeting the Go button using javascript would be a custom job and burn time, traversing the DOM to find the right "GO" button to set focus on....
    ... if possible I would just say "it can't be done" to the end user... is that an option?

  • Enter key in an input field

    Hi!
    How can I do that when the user press "enter" key click inside an input field (for example an inputText), that key press fires the action of a commandButton diferent than the fisrt i have placed in my form???
    Can anybody help me? =)

    Define your form with a on key press event:
    <h:form id="yourForm" onkeypress="if (event.keyCode == 13) {javascript:submitForm(); return false;}; return true;">The javascript function is:
    function submitForm(){
         if (event.keyCode == 13){
              document.getElementById('yourForm:submitButtonId').click();
              return false;
         return true;
    }submitButtonId is the id of the button that needs to be triggered when you press enter key. Hope this should solve your problem.
    SirG

  • I removed the ENTER key and can't get it back on

    Hi,
    Approximately 2 months ago i removed a few keys off my Macbook Pro to clean them. I managed to replace all of them except for the ENTER key.
    Underneath the casing there are 2 plastic bases which scissor. These bases attach via hooks on the main keyboard. I managed to get one back on but i can't get the other base back on. The enter key itself still works but without the housing on top.
    Went i went to the genius bar i was told because t was out of warranty they would charge me or if i went back to the retailer (Tesco) they would fix it within the 6 year european consumer law. The genius said that he could see it had not been mistreated and it shouldn't be a problem. When i consequently called Tesco they told me they wouldn't as it was user damage and that i should go back to Apple because when Tesco arrange repairs they get Apple to do them anyway.
    Im a little tired of heading backward and forward between the two companies and no one is helping. I just want my key back on.
    I have a mid 2012 Macbook Pro. i5 Processor, 4GB Ram, 500GB HDD.

    Make sure that you do not run Firefox in full screen mode (press F11 or Fn + F11 to toggle; Mac: command+Shift+F).<br />
    If you are in full screen mode then hover the mouse to the top to make the Navigation Toolbar and Tab bar appear.<br />
    You can click the Maximize button at the top right to leave full screen mode or right click empty space on a toolbar and use "Exit Full Screen Mode" or press F11.<br />
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Clearing the history causes the enter key and search button not to work

    If I clear my history and set my browser to never remember or suggest websites, the search button doesn't work. I can click on it but nothing happens. In addition, if I simply use the enter key from my keyboard, that doesn't work either. I have to reset firefox and then the new version will work (but if I go back and change all my history settings again and then it stops working). Please help.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Call transaction skip first screen and fill a field

    Hi,
    I have got a requirement where need to call transaction VA01 by filling the fields on the first screen like order type, sales area using set parameter IDs and need to skip first screen. There is additional requirement apart from this where I need to fill the field 'Proforma' with some value 'X' in the header 'Additional data A' while calling transaction VA01.
    Is there any shortway to do this without using BDCdata?
    Thanks
    SD

    Hi,
    I had this kind of requirement earlier. But in my case I need to pre populate several values and then show the screen for user input. Here is my suggestion for you. Follow below code for filling BDC DATA internal table and call transaction in "E" error mode. This should show the screen finally for user input. In this code find for "?" and replace it with your field name and field value.  Remember to check validity of screen # and names with you system.
    Thanks,
    Amara.
    Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code. Do not use code tags to format text
    Edited by: Rob Burbank on Dec 22, 2010 6:08 PM

  • F10 key and focus lost

    When I press the F10 key in Windows on a JavaFX program the focus goes to the titleBar, you can see it if you press Return later. Is there any way to disable this functionality?, I use keyboard accelerators and F10 key can't be used because of this behaviour.
    Thanks in advance

    I know that it's the default behaviour that's way I discover where was the focus after pressing F10. I have changed my keyboard accelerators to not use F10 key but if it's pressed the focus goes to the title bar (if you don't have a menu) and in my case, I use an undecorated window so is more difficult to see it. If you press return key after F10 you will get the window menu popup.
    It will be great to be able to control this...

  • Traversing Focus By Enter Key

    Please Try to Help Me on this ............
    I Have a Screen where I need to traverse focus (it has textfields, combo boxes and buttons) when I press the Enter Key (like Tab).
    I used a Key listener and was able to do it (to a certain point)
    The code I have written is below ..
    Now The problem is when the focus sets on a JComboBox, it wont go further (tab works). I know that the enter key in a JComboBox is used to select a item.
    So what I need is first to be able to select an item using the enter key and when press enter key again, the focus must go to the next component.
    Is there a way to do it ???
    (JCheckBox and JButton has similar problems)
    SymKey aSymKey = new SymKey();
    textfield1.addKeyListener(aSymKey);
    textfield2.addKeyListener(aSymKey);
    combobox1.addKeyListener(aSymKey);
    combobox2.addKeyListener(aSymKey);
    checkbox1.addKeyListener(aSymKey);
    textfield3.addKeyListener(aSymKey);
    button1.addKeyListener(aSymKey);
    class SymKey extends KeyAdapter {
    public void keyPressed(KeyEvent e){
    if (e.getKeyCode() == e.VK_ENTER) {
    if (e.isShiftDown())
    FocusManager.getCurrentManager().focusPreviousComponent((JComponent)e.getSource());
    else
    FocusManager.getCurrentManager().focusNextComponent((JComponent)e.getSource());

    Hi,
    You need to implement the focusmanager, and set currentfocusmanager with your focusmanger.Then it works out.Because Jcombobox is editable the keyevent of the combobox executes .
    Hope it helps.
    venkat

  • Since upgrading to Firefox 10.0.2 my AVG extension has had to be disabled, as after typing in any web address in the address bar, the enter key had no effect and I could not go to the site without pressing the Reload arrow on right.

    I have recently upgraded Firefox to the latest version 10.0.2. After that I could not enter any website address and press the enter key and get to the website, nor could I select a website from the dropdown list of previously visited websites. The only way I could get there was by pressing the arrow on the right side of the address box (Reload current page). Once I disabled the AVG extension, everything worked normally. As soon as I enabled the AVG extension, it stopped working again.

    Follow these steps for the controls to work:
    # Start > Programs > Mozilla Firefox > Mozilla Firefox
    # Find the “Tools” menu at the top of the browser window and select “Add-ons”.
    # Click on the “Extensions” icon to make sure you’re in the correct option menu.
    # Locate “AVG Safe Search” and click on the containing line to highlight and select the add-on.
    # Click the “Disable” button and close the Add-ons window.
    # Close down any Firefox windows you may have open.
    # That’s It – You’re Done!

  • Update keys and fields

    Hi All,
    In my landscape, we have 2 remote systems for mdm. ( say source as BO, target as ECC).
    When we import data from BO, we are generating key (based on Account group.) using Remote system key generation technique.
    But,at the same time we want to update same key value for the customer field.
    Is there any technique we can update key value for the field values?

    If I understand correctly, you want to populate both the Remote Key and a customer field with the same value taken from the BO system.  In your import map, select the field coming from BO in the Source Hierarchy Pane, right click, and select clone field.  You should then be able to map the field from BO to [Remote Key] and the cloned field to the customer field.

  • I downloaded Ios8 and my keyboard for my financial apps does not include a "enter" key or and "." decible key. How do I get my old keyboard back?

    All my financial apps require a "enter" key and a "." decibel key. The new keyboards for IOs8 only have a "delete" key and a blank key with no use.
    How do I get my old keyboard back to use on these apps?

    See Recover your iTunes library from your iPod or iOS device.
    tt2

Maybe you are looking for

  • My MacBook Pro is not working

    Hi, My MacBook Pro seemed to overheat and then stopped altogether. When I turn it on, all I get is a prompt with "Mac OS X Utilities" which give me 4 options: -Restore from Time Machine Backup (I DO NOT HAVE THIS) -Reinstall Mac OS X (WHEN I TRY THIS

  • Checkbox and date/text feild

    I need to create a form with a checkbox and a date/text feild in the same row. Is this possible? An example is below: Form [ check box ] name of document [date/text feild] [  ] document name [1/30/2014]

  • Ipod tuch 1gen has 2.2.1ios it needs 3.1 how do i download aaps and more

    ipod tuch has 2.2.1ios i here and all apps are 3.1 or 4.0 is there help for me?

  • IOS SIGSEGV crash in 17.0.0.124

    I'm getting this crash with 124 (and I don't think it ever happened with 123, but I may just have been passing in different parameters).  Anybody know whats going on? Incident Identifier: 18A41DC7-6FA7-4E34-B1C8-21B893F302C9 CrashReporter Key:   cb0b

  • Is Apple working on a fix for ios6 that will stop it from using huge data in the iphone 4s?

    When I upgraded my iPhone 4s to ios6, it started using huge amounts of data.  My provider refuses to reimburse me.  Today they told me that Apple has acknowledged the problem and has fixed it in ois6.3.  However, ois6.3 is unavailable for the 4s, and