Setting the focus in HTREE

Hi guys!
I have created the tree in the form 6i. it is populated with the employee names. Then attached a horizontal toolbar canvas with the main form and the horizontal tool bar canvas contain a text item and a search button. When I find the name of the emplyee it finds it but how can i set the focus. An early response is appreciated. regards.

Try FTREE.SET_TREE_SELECTION(tree, node, FTREE.SELECT_ON)

Similar Messages

  • How can I set the focus to a field on a Portal form?

    Can anyone tell me if it is possible to set the focus to a particular field on a form which was created in Portal and is based on a PL/SQL procedure?
    The form contains a mixture of field types and also takes parameters from another form and displyas them.
    I have managed to set the focus on a form which is defined dirdctly in a PL/SQL procedure, using Javascript, but this doesn't seem to work for a Portal form.

    Hi,
    look at the discussion on May 25:th 2001, subject "How to get the cursor into a specific field", it might give you an idea.
    To give you some hint right now:
    In the "Additional PL/SQL Code" tab, "Before displaying the page", add following code:
    htp.p('<BODY onLoad="document.forms[0].elements[6].focus();">');
    forms[0] if you only have 1 form, and elements[the number of the item you want to be in focus]
    I hope this could help you
    /Sara

  • How to set the focus to a first element in oracle apex 3.2.1  and 3.1.2.00

    Hello ,
    I am using oracle apex 3.2.1 in development env. How to set the focus to a first element of a page.
    thanks/mahesh

    Hi,
    This might help
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/bldr_pgs.htm#CJGJDHCI
    Find "Cursor Focus" from page Display Attributes
    Br,Jari

  • How to set the focus on the new added line in ALV list (OO)

    Dear Friends,
    I have an ALV list based on OO(using alv_grid->set_table_for_first_display), when I click the 'new' button to add a new line, the mouse arrow is always pointing to the first line - not the new created line for user to input!!.
    So how to set the focus (mouse arrow) on the new added line in ALV list for user to input it friendly?
    Thanks a lot!!

    Hello,
    To get the selected line row first we have get all the rows in the internal table.
    When u click on the button when it is creating the new line we have to pass the row number to the call method
    CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->get_selected_rows
       IMPORTING
          ET_INDEX_ROWS  =   <internal table of type LVC_T_ROW > (obsolete)
          ET_ROW_NO      =   <internal table of type LVC_T_ROID > .
    CALL METHOD<ref.var. to CL_GUI_ALV_GRID>->set_selected_rows
       EXPORTING
          IT_ROW_NO  =  <internal table of type LVC_T_ROID>
       or alternatively
       IT_INDEX_ROWS  =  <internal table of type LVC_T_ROW>
          IS_KEEP_OTHER_SELECTIONS  =  <type CHAR01>.
    http://help.sap.com/saphelp_erp2004/helpdata/EN/22/a3f5ecd2fe11d2b467006094192fe3/content.htm

  • Can someone explain how to set the focus to a component

    Hello,
    What is the best way to ensure that a component gets the focus with code. I have tried requestFocus and requestFocusInWindow and none of them seems to do there work. The frame containing the components that should get the focus is displayed, the component is focusable so that is not the problem. What I found out is that if the component is deep in a nesting of panes (where the top pane is in the frame) is that calling requestFocus or requestFocusInWindow does not give the component where this focus is called on the focus but either the pane that contains it, one of the parent panes of this pane or one of the components in these panes, in almost all cases the component requesting the focus does not get the focus at all. I always have to write a work around in defining a focus listener for all these panes that transfer the focus back to the component that requested the focus originally, I can't believe that this is the way to ensure that a component has the focus via code. I have searched for documentation but found nothing on what requestFocus(inWindow) is actually dooing (a lot about focus traversibility but I don't want to control this, just make sure that a component gets the focus).
    Again I'm pretty sure that the toplevel window is activated and that the component that requested the focus is focusable (I had created a derived version of the DefaultFocusManager that showed who has focus). Personally I think (and I'm not alone if you do a search in this forum on focus management) that there is either a big problem in the documentation of focus management or that it is still not possible to even try to set the focus on a component in a easy way.
    Marc

    Hello,
    thanks for your reply, here is some example code that illustrates the problem I have (the actual code is to big to show here, which is the raison why I did not posted it here). The code wil create a frame with a JPanel with a JTextField, a 'New' Jbutton and a 'Delete' Jbutton, a tabbed pane in the center ('New' will create a new JPanel, add it to the tabbed pane and set the focus on it, either by calling RequestFocusInWindow() directly or by calling it via InvokeLater (someone on this forum suggested to use this). I changed also the focusmanager to show the component that has the focus when you type something. To test compile and run the program (either with a call to requesteFocusInWindow directly or indirectly (by changing the comments), on my system I get the following behaviour:
    1. requestFocusInWindow called directly
    Start program en type, the tabbed pane has the focus
    Press New and type something, a button has the focus not the created panel
    Press New again and type something, a button has the focus not the created panel
    2. requestFocusInWindow be called indirectly
    Start program and type, the tabbed pane has the focus
    Press New and type, the created panel has the focus (I thought at one moment that I had found the solution there, but alas ...)
    Press New again and type something, a button has again the focus.
    Note that with my real program it is not always a button that will have the focus, sometimes it is a combobox or a TextField (I tried to get this with the example code (the JTextField) but did not succeed.
    Hopes this clarify the problem a little bid, what I want is when the window is visible to set focus on newly created panes (or in the real program on the panel that is selected via the tabbed pane or via a key combination to shift the focus between the panels) but requestFocusInWindow seems to behave unpredicatable. I can't imagine that what I see is a bug so I must make some assumptions which are not valid but I don't see them, btw listening on the WindowListener is I think not the solution because the frame is already displayed when I want to set the focus and I do not use a modal dialog box.
    The example code follows here
    Marc
    * Main.java
    * Created on December 21, 2004, 8:58 AM
    package testfocus;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * @author marc
    public class Main
    static int counter;
    /** Creates a new instance of Main */
    public Main()
    * @param args the command line arguments
    public static void main(String[] args)
    JFrame frm=new JFrame();
    JPanel content=new JPanel();
    frm.setContentPane(content);
    final JTabbedPane paneContainer=new JTabbedPane();
    JPanel bar=new JPanel();
    JButton create=new JButton(new AbstractAction("New")
    public void actionPerformed(ActionEvent ev)
    counter++;
    final JPanel pnl=new JPanel();
    pnl.setName("test"+counter);
    paneContainer.add(pnl);
    pnl.setFocusable(true);
    pnl.requestFocusInWindow();
    /* Either use this or the previous line
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    pnl.requestFocusInWindow();
    JButton delete=new JButton(new AbstractAction("Delete")
    public void actionPerformed(ActionEvent ev)
    int i=paneContainer.getComponentCount()-1;
    if (i>=0)
    paneContainer.remove(i);
    JTextField dummy=new JTextField("Test");
    bar.add(dummy);
    bar.add(create);
    bar.add(delete);
    content.setLayout(new BorderLayout());
    content.add(bar,BorderLayout.SOUTH);
    content.add(paneContainer,BorderLayout.CENTER);
    frm.setSize(300,400);
    FocusManager.setCurrentManager(new DefaultFocusManager()
    public void processKeyEvent(Component component,KeyEvent ev)
    System.out.println("Focus owner"+getFocusOwner());
    super.processKeyEvent(component,ev);
    frm.setVisible(true);
    }

  • How to set the focus to the tabbed pane title?

    Dear Friends,
    I'm using tabbed pane (JTabbedPane) in my application. I have 2 tabbed panes and each contain some text fields and buttons.
    In first tabbed, I have 2 text fields, OK and Cancel buttons. I have to set the focus to the title of the tabbed pane after it lost focus from the Cancel button (focus has to move from Cancel button to tabbed pane title by pressing tab key).
    Could anyone please tell me how to set the focus to the tabbed pane title?
    Thanks in advance,
    Sathish kumar D

    Thanks for your reply.
    Could you please tell me how to set focus for title of the tabbed pane throug FocusTraversalPolicy?
    because usually we set the focus for the component by requestFocusInWindow().
    for example set focust to the button OK,
    btnOk.requestFocusInWindow()likewise could you tell me how to set focus to Title of the tabbed pane?
    Sathish kumar D

  • How I set the Focus in object

    Hello.
    I need set the focus on first object in a JInternalFrame.
    The form JInternalFrame contain a JTabbedPanel and this include object jFormatedTextFields.
    I need when the init form set the focus over first object in the first tab of JTabbedPanel. How I do?.
    Than You

    works OK in this
    (tabbed panes seem to be working OK for focus now, don't know what's changed)
    import javax.swing.*;
    import java.awt.*;
    import  javax.swing.text.*;
    class Testing extends JFrame
      MaskFormatter mf;
      JFormattedTextField ftf;
      public Testing()
        setLocation(300,200);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        try{mf = new  MaskFormatter("###.###.##.##");}
        catch(Exception e){e.printStackTrace();}
        ftf = new JFormattedTextField(mf);
        JTabbedPane tp = new JTabbedPane();
        tp.addTab("A",ftf);
        JDesktopPane dp = new JDesktopPane();
        JInternalFrame if1 = new JInternalFrame( "I-F1", true, true, true, true );
        if1.setLocation(50,50);
        if1.getContentPane().add(tp);
        if1.pack();
        if1.setVisible(true);
        dp.add(if1);
        getContentPane().add(dp);
        setSize(400,300);
        setVisible(true);
        ftf.requestFocusInWindow();
      public static void main(String[] args){new Testing();}
    }

  • Metoh refresh_table_display will set the focus to the first cell

    metoh refresh_table_display will set the focus to the first cell,how i can set it back to the position before
    refresh.
    thanks.
    Message was edited by: W C

    Hi,
    The method REFRESH_TABLE_DISPLAY has the parameters, IS_STABLE. Set both ROW / COL parameters of IS_STABLE to 'X'.
    Then when you refresh the display will not shake.
    Regards,
    Ravi
    Note : Please close the thread if answered

  • Setting the focus to a text field on a subform in the form initialize event.

    I have a form that checks the rawValue of a text field to determine whether or not the focus should be set on a particular text field. Here is the logic:
    if(txtEmailVisible.rawValue == "visible")
    frmEmailData.presence = "visible";
    xfa.host.setFocus(xfa.form.NEDA.main.frmEmailData.txtEmailBody);
    else
    frmEmailData.presence = "hidden";
    For some reason the focus isn't going to that object, instead it is still going to the first field in the tabbing order. Am I calling this in the wrong event, which is causing the tabbing order to over ride my setFocus call?
    Thanks,
    Chad

    Try using setTimeout for this from the DocReady event.
    app.setTimeout("xfa.host.setFocus(xfa.form.NEDA.main.frmEmailData.txtEmailBody);
    ", 250);
    There are several occasions where code must be executed after init/formReady/DocReady, etc. has been completed. This is one of them.

  • Setting the focus

    Hello,
    as requestFocus() has no effect and requestFocusInWindow() is even not recognized, I'm searching for a functioning way to properly setting a focus to, e.g., a JTextField.
    yours truly, Raffael Vogler

    requestFocus() ought to be the way to go. Maybe your JTextField is placed on a disabled container?

  • How to submit a page and set the focus on the next field?

    Hello,
    I have a form with some fields and below this a report with a column link. If I change values in the form fields and I click the on a column link the changes in the fields are lost because the page is not submitted.
    I try this: I set on the fields in HTML Form Element Attributes the following:
    onchange="doSubmit('AENDERUNG_UEBERNEHMEN');"
    And I create a branch to the same page. This works great, I dont lost the changes in the fields and I can use the column links.
    But: If I want to walk through the form with the key "TAB" I have to press the key 2 times to come to the next field.
    How can I submit the page and go to the next field?
    Regars,
    Mark

    Hello Mark,
    how about submitting the page when the column link in the report is clicked. To do this, create a column link with an URL target and specify a target like
    javascript:doSubmit('#ID#_AENDERUNG_UEBERNEHMEN').After that I would create a process, that checks if
    substr(:REQUEST,instr(:REQUEST,'_')+1) (or something like that)
    equals 'AENDERUNG_UEBERNEHMEN'. If so, save the change, set the PK value of your target page to
    substr(:REQUEST,1,instr(:REQUEST,'_'))  (to extract the ID)
    Afterwards, create a branch that jumps to the target page.
    Hope that helps
    Stephan

  • How can I set the Focus on af:inputText

    Hi,
    I write the javascript for email validation and I import it in my jspx page and using client listner i want to invok the function in that javascript using onBlur event.if i put a single field it wil validat but if i using 2 or more the it wil nt wrk..Thnz in adv.

    I have problem that fragments Pages and Javascript,
    I have two inputText,how to make the focus of the first pass to the second box?
    I work with fragment pages (.jsff) where to put the javascript code? and how invoke this code?
    Thanks.

  • Script that will automaticly set the focus to the next text box after the previous one is completed

    Specificly, entering a SSN into a form with three text boxes. 1st box for first 3 digits, 2nd box for middle 2 digits, and 3rd box for last 4 digits. I would like the user to be able to enter the 1st three digits into the 1st box, and after the 3rd digit is entered, the focus jumps to the 2nd box, then once the middle two are entered, the focus jumps the the 3rd box without having to manually use the tab key to advance through the boxes. Thanks.

    See JavaScript - setFocus Method for tabbing to next form field for a sample form that uses a document level script and custom keystroke script. See Entering Document Scripts and Entering scripts for form fields by Thom Parker for detailed instructions on entering or viewing these type of scripts.

  • Unable to set the Cursor focus on a particular field in OA Page

    Hi,
    I have a custom page with 3 controllers . Now when i delete a row from the Advance table, the focus of the cursor goes to the top of the page. My requirement is that, the focus should remain in the Advance table region itself.
    I tried to set the focus using the below code. It dosent work. Could there be an issue since iam using more than one controller for the page?
    OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean();
    bodyBean.setInitialFocusId("item164"); // item164 is the messageTextInput field in the Advance table region.
    I tried to get the Initialfocus value after its set. The value shows as 'item164'. However , it doesnt focus on that item.
    Please help me out in fixing this issue.
    Thanks
    AG

    Hi,
    Thanks for the Info. Can you help me with this java script or if you can provide me any reference it would be hepful.
    Basically the focus has to stay in that particular AdvanceTable region where the row is deleted. Not required that the focus has to point to the next row after the delete.
    Thanks
    AG
    Edited by: 928445 on Apr 26, 2012 12:06 AM

  • How to set the default focus to  a particular jtextfield

    hi,
    i'm trying to set the focus to the specified Jtextfield by default.
    i tried with reqestFocus() method,grabFocus() method,getCursor() method
    but all in vain.
    can anyone suggest me a solution please.
    very urgent request please
    thanks in advance
    regards
    Ravi teja

    If I understand the question correctly then this thread will help:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=290339

Maybe you are looking for