[ADF Faces] set cursor position to the first column input text in ADF table

How do i set the cursor position to the first column input text when i Insert a blank row?
My idea is to implement using javascript. document.setfocus() but how do i do it from the backing bean code? or how do i install custom js to call document.setfocus()?
any ideas?
Message was edited by:
user450391

Did you try by iterating the selected row?
Bind the table with the managed bean and then try with below code:
RichTable empTable;
RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();   
Iterator selectedEmpIter = selectedEmps.iterator();
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding empIter = bindings.findIteratorBinding("EmpView1Iterator");
RowSetIterator empRSIter = empIter.getRowSetIterator();
while(selectedEmpIter.hasNext()){
   Key key = (Key)((List)selectedEmpIter.next()).get(0);
   Row currentRow = empRSIter.getRow(key);
   System.out.println(currentRow.getAttribute("Ename"));

Similar Messages

  • Setting Cursor position

    Pls help me for the following query:
    how to set cursor position at the beginning of text field(JTextField) after setting text inside it.

    RTFM
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/text/JTextComponent.html#setCaretPosition(int)

  • How do I increase the width of the first column in the Terminal ls -l command?

    I am now running 10.9.x, but I've experienced the problem described in the question over the last several iterations of OS X.
    I use bash as my interactive shell. When I display the "ls -l" command in Terminal the output is often very difficult for me to scan, because the columns in which are displayed the several fields of the records for the listed files are misaligned (different left-hand first-letter starting points for left-aligned text-valued fields; different right-hand low-digit alignment of numerical fields).
    When I look more closely at the mess displayed in my Terminal window, it appears that the cause of the problem may be that no minimum width, or an inadequate minimum width, has somewhere been set or defined for the first column of each record, containing the file's "mode" string (permissions, etc.); for all records in which this string is of equal length, the succeeding columns for all fields in those records are themselves aligned.
    It has not always been thus for me in the Terminal with OS X, or else I might not dream that the world could be a better place in this one respect. But if I launch an interactive csh-shell instead of bash in Mavericks today, the columns of the ls -l command there align no better.
    I've found no help in the Unix man pages for the ls command. There is a COLUMNS environment  variable whose value is supposed to be used by the ls command to set the width of every column displayed, but this is not what I want to do, and in my shell "ls -l" seems to ignore the exported variable anyway.
    There is also an LS_COLWIDTHS environment variable that is described as setting column widths on a field-by-field basis, at least for some fields, but the the mode column is not included among those whose width is supposed to be adjustable, and my shell seems to ignore the value of this variable as well.
    I've looked in my rather simple ~/.profile and ~/.bashrc files for anything that I might plausibly suspect of producing or perpetuating this behavior, but there is nothing there. Any suggestions about how to remedy this problem?
    Randy Miller

    John,
    I would like you to perform a safe boot. On reboot, press and hold the shift key at the chime, until the grey horizontal bar appears. After you type in your password, press and hold the shift key again, then click the right arrow to login, and release the shift key when your desktop appears. Move the contents of your local ~/Library/Caches into the Trash. Reboot normally. Empty your Trash.
    Re-evaluate your Terminal behavior. If it now works ok, great. Otherwise, here are a sequence of screen shots of my Terminal preferences for comparison. I can use both Courier fonts without formatting issues. Click to enlarge. I use the free IR Black Terminal theme as a personal choice in OS X 10.9.4. In my ~/.bashrc file (triggered from ~/.bash_profile), I export TERM=xterm-256color, and invoke /usr/bin/tput init. Click on the following images to enlarge.

  • Cursor position in the mx:TextInput

    Hi guys, does anyone knows how to set the exact cursor
    position in the mx:TextInput ? For example I want to set cursor
    after the second symbol. Is that possible ?

    <textinputID>.setSelection(position, position);
    for example, if i want my cursor in the second position of a
    textinput named "nameField":
    nameField.setSelection(1,1);
    *used 1 because index starts at 0

  • Customizing cursor positioning in the delivery

    We are currently running SAP 4.6C with support pack level 48. We recently upgraded from support pack 29. Per OSS note 507967 which was applied per support pack 32, the cursor on all tabs under the Delivey Overview screen is placed on the first open lineitem's material number. Prior to this support pack update, the cursor was positioned on the first lineitem's item number field. Is there anyway we can revert back to having the cursor placed on the first lineitem's item number WITHOUT modifying the SAP code?

    Hi,
    Please create a OSS message reporting the problem to SAP.
    You can create OSS message on the website service.sap.com.
    You would need to have OSS Id to be able to report the problem to SAP.
    SAP will provide another note for the problem caused due to support pack upgrade.
    This is the only option other than modifying the code.
    <b>Reward if helpful.</b>Thanks,

  • Set cursor position in console

    Hello,
    I would like to set the position of the cursor in the console (command prompt).
    Is ther a way to do this ?
    public void printChar(int x, int y, char ch) {
         <set cursor position>(x,y);
             System.out.println(ch);
        }Thanks

    Ymas wrote:
    Do i have to add something like import java.???
    No, nothing starting with "java.*" will help you. There is no way you can do that using only what Java provides itself, you will need to use external libraries.
    Chances are, you don't want to do this right now and forget about it, just write one line after another.
    If it s not too long could you write me the code for <*set cursor position*>(x,y);Find, download, learn to use JCurses or a similar library and write it. If that sounds like a lot of work for such a "simple" functionality then yes: that is a lot of work for such a little thing.
    It's generally not worth doing.

  • Wait cursor appears only the first time... unless I don't move the mouse!

    Ah yes, another cursor problem:
    I am setting a wait cursor in my main JFrame when a key-release or a menu item click is detected (the time-consuming action is then triggered in a child JInternalFrame), and so far, it's been working great.
    Then I noticed that the wait cursor only appears the first time the time-consuming action is called (or more precisely, if I never move the mouse, it happens every time as it should, but if I move the mouse, it only happens the first time! Ah, and I noticed I CAN move the mouse but ONLY when it is in the form of the wait cursor!).
    Strangely, I can see the cursor blink briefly when the action is done, precisely when it should be changing back to the default cursor... what gives? If I close the child internal frame and re-open it, I can get the wait cursor again the first time only (again, unless I keep the mouse still, in which case it works great - argh).
    Any ideas would be deeply appreciated!
    Cheers!
    PS - Here's a snippet of how we set the cursor, this is code in our main JFrame, called via either a keypress event or clicking on a menu item - mostly it's stuff that is unrelated, and we simply set the wait cursor as the very first line, so why in the world would it skip that line???? (the rest of the lines do in fact get executed):
    private void refreshMenuItemActionPerformed(java.awt.event.ActionEvent evt) {     doRefreshMenuItemAction(); }
    private void doRefreshMenuItemAction() {
    this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
    JDesktopPane desktop = (JDesktopPane)this.getContentPane().getComponent(0);
    JInternalFrame activeFrame = desktop.getSelectedFrame();
    try {
    if ( activeFrame instanceof IDataDrivenForm ) {
    ((IDataDrivenForm)activeFrame).refresh();
    } catch (Exception ex) {
    ex.printStackTrace();
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

    almost...
    I now see that glasspanes are an answer to that question. I got it to work (almost) using a glasspane (see code snippet below). But what I can't quite grasp now is why this code does not work when I call it from a child (contained) dialog (and possibly internal frames as well)??? When I do so, the dialog freezes (the button I pressed doesn't even release) and the cursor does not change to waiting. This time I'm really not sure where to go next....
    I appreciate anyone who has read this far, and would really be indebted to you for some good advice!
    PS - Here's the nifty code, placed in my main JFrame class. I just substituted "this.setBusy(true);" for every place I was manually setting the WAIT_CURSOR in the past (and of course with matching setBusy(false)):
    public final void setBusy(boolean isBusy)
    Component glassPane = this.getGlassPane();
    Cursor theCursor = isBusy ? Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) : Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR );
    this.setCursor( theCursor );
    glassPane.setCursor( theCursor );
    glassPane.setVisible( isBusy );

  • Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,change remotes, no change.Help please.

    Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,changed remotes, no change. Latest software update. This is really annoying.  iPhone remote app works just fine.  Any suggestions?

    That's one of the weird things.. it recognizes it maybe 10% of the time. And usually, only after I do the two-button reset. Problem is.. since it won't charge above 2%, anytime I try to do a restore or anything like that using iTunes, my device shuts off and I lose whatever progress I'd made.
    So, an update... after reading through a bunch of similar complaints (there are literally 1000's of them so there's NO WAY this isn't somehow ios7 related, thanks a lot APPLE ) I decided to try a restore in recovery mode. After 3 hours and several disconnections... I ended up having to just set it up as a new iPad, as the restore did nothing. Weirdly though... as I was doing the restore in recovery mode.. I noticed I'd gotten up to a 10% charge.. higher than it's been since September, so after setting it up as a new device, I turned it off and plugged it in using the wall charger. 2 hours later and I was up to 38%. Still not great, as my iPad, before ios7 could've fully charged twice in the amount of time it took for me to now get 28% more of a charge. And that's with a fully cleaned out device.. so that really ***** and I'm now more confused than ever.
    But I'm gonna leave it overnight charging and see what I come up with tomorrow. Sadly, when I paid $600 for it in February, I never expected to have to play "wait and see" with it...

  • How do I set Pages to capitalise the first word of a new paragraph

    Does anyone know how I set Pages to capitalise the first word of a new paragraph.

    Hi Peter
    That worked, thank you
    However, what I was wanting was to set Pages to start every new paragraph with a capital letter
    Any ideas?
    Thanks

  • When I set up email for the first time, I had to enter a 4 digit pin. Since then, every time I switch my phone on, I have to enter this pin.   How do I remove or bypass the pin so that I can switch on the Iphone without having to first enter a pin?

    When I set up email for the first time, I had to enter a 4 digit pin. Since then, every time I switch my phone on, I have to enter this pin.   How do I remove or bypass the pin so that I can switch on the Iphone without having to first enter a pin?

    Go to Settings>General>Passcode Lock>tap Turn Passcode Lock Off, enter your "pin".
    Edit:  Are you saying you are getting a prompt for your email pin, or are you talking about the passcode lock that appears when you turn the phone on?

  • How to get the cursor position in the text edit box?

    Hi, all.
    I want to get the cursor position in the text edit box
    to insert some data.
    But I don't know how to get.
    Can someone give me some advice?
    BestRegard.
    Miya.

    Hi Miya,
    Write your own textSelectionSuite for this.
    and use ITextTarget->GetRange() function.
    Thanks and Regards,
    Yopangjo.

  • HT201356 How on earth do you answer or change the verification questions when you never set them up in the first place?

    how on earth can you answer the verification password change questions when you never set them up in the first place?

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (124244)

  • TS1424 I am trying to purchase something from app store and it is asking me to answer 2 security questions that I never set up/answered in the first place? Has this happened to anyone else? How do i fix this or reset these security questions?

    I am trying to purchase app from app store and its asking me to answer my security questions which I dont know because I never set them up in the first place! How do i get passef this or change it to reset my own security questions?? 

    Click here for information. If the option to have the answers emailed to you isn't available or doesn't work(the email may take a few hours to arrive), contact the iTunes Store staff via the link in that article.
    (88522)

  • Do I require internet connection to set up iPodShuffle for the first time (Windows)?

    Will I require internet connection to set up iPodShuffle for the first time (Windows)?

    I don't think so. THe only thing you need internet for is to download the free VoiceOver feature, and that's optional.

  • How do I set up voicemail for the first time?

    I feel like i am losing my mind.  I CANNOT find simple instructions (even in the manual) on how to set up my husband's voicemail on the BB 8800.  There are all kinds of questions and answers about voicemail, but I just need to know how to set it up for the first time.  The message you get when you call the phone is "This user has not yet set up voicemail" (or something to that effect).
    PLEASE HELP!
    Solved!
    Go to Solution.

    This is simple in deed! Go to Call Log -> click Menu and  select Options -> Voice Mail. Now in the Access Number put your carriers Voice Mail Box number. Some carrier requires access password which you can also put in the.
    Let know if this helps.
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

Maybe you are looking for

  • Help with my ipod shuffle please

    How I can remove that function at the end of play list start again. Thanks to the community in advance

  • Import service Purchase order

    Hi Experts, I am facing  this problem when i am creating import service Purchase order with Purchase requisition. my import pricing procedure have Assessible value percentage condition type,which is coming in import service PO with certain percentage

  • There is no files in "video_ts"

    Hi all, I tryed to search the topics without any results about this problem. I have som Video_ts folder with *.vob files and so on,,, I can play the "movie" from dvd-player but not thrue Front-Row. If no folder is in the Movie folders a message tells

  • Did not get my music from i tunes

    i didnot recieved my purchase from i tunes for music .

  • Crossfade while skipping forward/backward

    I use iTunes for running background music and special performance tracks at my church. Is there currently a way to get iTunes to crossfade songs when skipping to the next or previous song? If not, here's my vote to add that feature. Thanks!