Uix: return key as accelerator?

Hello!
Is there any way to use the return key to submit a form in uix? Someone else on this board said there isn't two years ago, but I can't believe this, as this is an important improvement to every UI. Take Google, for example, and imagine how annyoing it would be to use the mouse for every search you start. I know that I can implement accelerators like Alt+S easily, but I want people to see the results when they just hit enter intuitively.
I've tried to get this working using a client-side event handler:
if(window.event.keyCode==13)
    SIMULATE_CLICK_ON_BUTTON;I could not figure out how to submit the form correctly, that is, I don't know what to fill in for SIMULATE_CLICK_ON_BUTTON. A simple frmDqu.submit() did something (I could see it in the browsers status bar), but the page was still the same.
It would be nice if someone could help me here!
Greetings,
Michael

Hi Michael,Hello!
Thank you for your answers. I'll try to explain it a little bit better.
What is your exact requirement,I have an application with many use cases. Most of them just manage DB tables, so they consist of one page for search and navigation (and another one for editing existing and creating new entries; there are also three data actions doing create, commit and rollback). I think it would be best to look at the search/nav page first however. I built it by dragging a 'search form' from the DataControls palette to the page. When I start the application, the table is visible, then I click on my 'search' button, the table disappears and the search form shows up. The first messageTextInput gets the focus. What I want the user to do is to just press, for example, |Tab||Tab| to jump to the third input, type text, hit |Enter|. This should invoke the 'execute' button, which is the first button in the search form and has its location left to the 'cancel' button within a page button bar inside the same labeledFieldLayout the messageTextInputs are in. I hope this is clearly enough, i have added the code at the bottom however..
I should mention that I use the BLAF (Oracle) visual. Using a different style containing buttons instead of images like MINIMAL, there are default buttons.
My hope was that I could use a small JavaScript in the keyPress event handler of the form to trigger the 'execute' button, as I mentioned in my first post. I know that the handler works, I just do not know how to simulate a click on the button (which is actually an <a>+<img> in the BLAF environment). So i would need a line of code I can put in the client-side event handler that 'clicks on the execute button' for me.
which version of JDev
or UIX you are currently using.I am using Oracle JDev 10g. The about box tells me:
Version 9.0.5.2 build # 1618
ADF UIX 2.2.8
Thank you for the sample and the URL. They did not help me much though. This is the code of my page (I left out some of the event handlers):
<?xml version = '1.0' encoding = 'windows-1252'?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
      xmlns:ui="http://xmlns.oracle.com/uix/ui"
      xmlns:data="http://xmlns.oracle.com/uix/ui"
      xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
      xmlns:struts="http://xmlns.oracle.com/uix/struts"
      xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
      xmlns:myTemplate="http://www.telekom.de/">
  <templates xmlns="http://xmlns.oracle.com/uix/ui">
    <templateImport source="../mainApp.uit"/>
  </templates>
  <content>
    <struts:dataScope xmlns="http://xmlns.oracle.com/uix/ui"
            xmlns:data="http://xmlns.oracle.com/uix/ui">
      <provider></provider>
        <contents>
        <document>
          <metaContainer>
            <head title="Qualität DUST"/>
          </metaContainer>
          <contents>
            <body initialFocusId="start">
              <contents>
                <form name="frmDqu" method="post" onKeyPress="/*if(window.event.keyCode==13){submitForm(frmDqu,1); return false;}*/">
                  <contents>
                    <myTemplate:mainApp fensterTitel="Qualität DUST"
                                                xmlns:myTemplate="http://www.telekom.de/">
                      <myTemplate:messageArea>
                        <flowLayout>
                          <contents>
                            <messageBox automatic="true" model="${data}"/>
                          </contents>
                        </flowLayout>
                      </myTemplate:messageArea>
                      <myTemplate:contentArea>
                        <flowLayout>
                          <contents>
                            <spacer height="10" width="10"/>
                            <flowLayout>
                              <contents>
                                <flowLayout rendered="${bindings.T1DquView1Iterator.findMode}">
                                  <contents>
                                    <header text="Suchkriterien eingeben" id="detail7">
                                      <contents>
                                        <labeledFieldLayout>
                                          <contents>
                                            <messageTextInput model="${bindings.DquQualnr}" columns="10" readOnly="false" required="no" maximumLength="3" id="start" disabled="false"/>
                                            <messageTextInput model="${bindings.DquQualitaet}" columns="10" readOnly="false" required="no" maximumLength="12" id="qualitaet"/>
                                            <spacer width="10" height="35"/>
                                            <pageButtonBar>
                                              <contents>
                                                <submitButton text="Suchen" event="action" accessKey="s" model="${bindings.Execute}" id="Execute01"/>
                                                <submitButton text="Abbrechen" event="goCancel" accessKey="a" onClick="frmDqu.reset();"/>
                                              </contents>
                                            </pageButtonBar>
                                          </contents>
                                        </labeledFieldLayout>
                                      </contents>
                                    </header>
                                  </contents>
                                </flowLayout>
                                <header text="Qualität DUST" rendered="${not bindings.T1DquView1Iterator.findMode}">
                                  <contents>
                                    <table model="${bindings.T1DquView1}" id="T1DquView112" partialRenderMode="multiple" partialTargets="_uixState" alternateText="Keine Datensätze gefunden.">
                                      <contents>
                                        <column>
                                          <columnFormat columnDataFormat="numberFormat"/>
                                          <columnHeader>
                                            <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.T1DquView1,'DquQualnr')}"/>
                                          </columnHeader>
                                          <contents>
                                            <textInput model="${uix.current.DquQualnr}" columns="10" readOnly="true">
                                              <onSubmitValidater>
                                                <decimal/>
                                              </onSubmitValidater>
                                            </textInput>
                                          </contents>
                                        </column>
                                        <column>
                                          <columnHeader>
                                            <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.T1DquView1,'DquQualitaet')}"/>
                                          </columnHeader>
                                          <contents>
                                            <textInput model="${uix.current.DquQualitaet}" columns="10" readOnly="true"/>
                                          </contents>
                                        </column>
                                      </contents>
                                      <tableSelection>
                                        <singleSelection model="${bindings.T1DquView1Iterator}" text="Ausgewählte Reihe">
                                          <primaryClientAction>
                                            <firePartialAction targets="_uixState" source="T1DquView112" event="select"/>
                                          </primaryClientAction>
                                          <contents>
                                            <submitButton text="Korrigieren" event="goDetail" accessKey="k"/>
                                            <spacer width="5" height="10"/>
                                            <submitButton text="Löschen" event="goDelete" accessKey="l" onClick="return confirm('Soll der Datensatz gelöscht werden?')"/>
                                          </contents>
                                        </singleSelection>
                                      </tableSelection>
                                      <tableActions>
                                        <flowLayout>
                                          <contents>
                                            <submitButton text="|<" model="${bindings.First}" id="First14" event="action"/>
                                            <submitButton text="<" model="${bindings.PreviousSet}" id="PreviousSet15" event="action"/>
                                            <submitButton text=">" model="${bindings.NextSet}" id="NextSet16" event="action"/>
                                            <submitButton text=">|" model="${bindings.Last}" id="Last17" event="action"/>
                                          </contents>
                                        </flowLayout>
                                      </tableActions>
                                    </table>
                                    <spacer width="10" height="10"/>
                                    <separator/>
                                    <spacer width="10" height="10"/>
                                    <pageButtonBar>
                                      <contents>
                                        <submitButton text="Suchen" model="${bindings.Find}" id="Find13" event="action" accessKey="s"/>
                                        <submitButton text="Alle anzeigen" event="showAll" accessKey="a"/>
                                        <spacer width="50" height="10"/>
                                        <submitButton text="Neu anlegen" event="goNew" accessKey="n"/>
                                      </contents>
                                    </pageButtonBar>
                                  </contents>
                                </header>
                              </contents>
                            </flowLayout>
                          </contents>
                        </flowLayout>
                      </myTemplate:contentArea>
                    </myTemplate:mainApp>
                    <formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>
                  </contents>
                </form>
              </contents>
            </body>
          </contents>
        </document>
      </contents>
    <!--/dataScope-->
    </struts:dataScope>
  </content>
  <handlers>
    <event name="action" source="Execute11">
      <invoke method="doIt" javaType="oracle.jbo.uicli.binding.JUCtrlActionBinding" instance="${bindings.Execute}"/>
    </event>
    <event name="action" source="Find13">
      <invoke method="doIt" javaType="oracle.jbo.uicli.binding.JUCtrlActionBinding" instance="${bindings.Find}"/>
    </event>
    <event name="action" source="Execute01">
      <invoke method="doIt" instance="${bindings.Execute}" javaType="oracle.jbo.uicli.binding.JUCtrlActionBinding"/>
    </event>
    <event name="goCancel">
      <compound>
        <invoke method="doIt" instance="${bindings.Execute}" javaType="oracle.jbo.uicli.binding.JUCtrlActionBinding"/>
      </compound>
    </event>
  </handlers>
</page>Bye,
Michael

Similar Messages

  • Return key as button accelerator

    I ahve been developing a swing based application for a while and it is nearing competion. I have however got just one problem left. Most of my users are on windows and as you probably know windows uses the return key for button presses where as java uses the spacebar.
    What I would like to know is there any way to change this or have both active with out goign through and putting key listeners on everything etc etc. Setting mnenomics and the like seems simple so I am sure this is simple as well but I cant seem to find it.
    TIA

    You set the default button as follows:
    getRootPane().setDefaultButton( button1 );
    However, if you have more than one button, then tabbing through each button and going back to a text field will cause the last button to become the default button. I reset the default button with the following FocusListener:
    FocusAdapter resetDefaultButton = new FocusAdapter()
         public void focusLost(FocusEvent e)
              getRootPane().setDefaultButton( button1 );
    button2.addFocusListener( resetDefaultButton );
    button3.addFocusListener( resetDefaultButton );
    button4.addFocusListener( resetDefaultButton );
    Try it without the FocusListener first. Hope this helps.

  • Run quickSearch with the carriage-return key

    Hi to all,
    I am using JDeveloper 10.1.2 and developing an application using ADF Business Components and JheadStart 10.1.2.
    JHS built the application and i need to do some post-generation.
    I need to run quickSearch with the carriage-return key.
    To do that, i replace
    <messageTextInput id="searchText" name="searchText" text="${searchBean.searchText}" rows="1" maximumLength="255" columns="60"/>
    by
    <messageTextInput id="searchText" name="searchText" text="${searchBean.searchText}" rows="1" maximumLength="255" columns="60">
    <enterClientAction>
    <fireAction event="quickSearch"/>
    </enterClientAction>
    </messageTextInput>
    The problem is the carriage-return action go systematically to the BackButtonErrorPage.
    How can i solve this problem ?
    Is it a good solution ?
    Sorry, if my english is not very well.
    Thanks
    Laurent

    Thank you Martijn for your help
    I tried your solution :
    In UIX :
    <messageTextInput id="searchText" onKeyDown="if(window.event.keyCode==13) doSearch(event,'goSearchButton');" name="searchText" text="${searchBean.searchText}" promptAndAccessKey="&amp; de recherche" rows="1" maximumLength="255" columns="60"/>
    <button id="goSearchButton" name="goSearchButton" onClick="doDataEvent('quickSearch','quickSearch', 'true' );" text="${nls.GO}"/>
    In javascript :
    function doSearch(e, buttonName) {
    buttonToClick = document.getElementById(buttonName);
    buttonToClick.click();
    The behaviour is the same, i often go to the BackButtonErrorPage but not systematically.
    But if i use the search button, i never go to the BackButtonErrorPage.
    I don’t undersand,
    Anybody has an idea ?
    Regards
    Laurent

  • In the previous version, the menu table in table options, there is an option that gives me the option: the Return key moves to next cell. I do not see this option in the new number. can you help me please?

    in the previous version  of Number, the menu table in table options, there is an option that gives me the option: the Return key moves to next cell. I do not see this option in the new number. can you help me please?

    Hi silvano,
    If you use a regular pattern when entering values, press enter (return) after entering the last value in a row. That will take you to the first Body Cell of the next row.
    Start in Cell B2
    1 Tab 2 Tab 3 Enter
    4 Tab 5 Tab 6 Enter
    7 Tab 8 Tab 9 Enter
    Now you are ready to type into B5 .
    Another way that some people find easier is to enter one column at a time
    Start at B2
    1 enter
    4 enter
    7 enter
    etc.
    Now start with C2.
    Use whatever suits your work flow.
    Regards,
    Ian.

  • How do I perform an action on return key press in an inputListOfValues?

    I know about the autoSubmit attribute, but I do not want to perform an action on a tab character or when exiting focus. Instead, I want to perform the same action as pressing a button when the user presses the return key in the input field. For example, an inputListOfValues for a search input, and a search button. When the user presses the return key, I would like the search to be performed. I'm sure that this can be done, I'm just not sure how. Thanks for any info.

    I did something similar, on an input box, not on an inputListOfValues, but I assume it should work the same way more or less. I got it from
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_event.htm#DAFBJGAH
    I used it for my login page so the user doesn't have to click on Login, just press enter after entering the password. I just had to map the corresponding method binding.
    BTW, the link above doesn't tell you have to add the javascript to the page. What I did was add an af:resource element inside of af:document.
    Hope this helps.

  • Return Key no longer works in sql windows or procedure editors.

    The <return> key no longer works in my SqlDeveloper editors. Is there an easy fix? I tried resetting the Option for the carriage return but it did not change anything.

    So if you go to your shortcut keys (Tools > Preferences > Shortcut Keys) and search for "Enter", what commands are associated with the Enter shortcut? If you have tried remapping the Enter key to something else, it may have removed the standard association with the "Insert New Line" command.
    You can reset to the default (which should fix the problem, but lose any custom shortcuts) with More Actions (top right) > Load Keyboard Scheme > Default.
    theFurryOne

  • Is there a way to get a soft keyboard on iOS to show ´join´ or ´send´ in the return key of a keyboard?

    I saw that the ReturnKeyType [1] only supports a subset of value possible on iOS [2].
    Basically the supported return key types are "done", "go", "next", "search" and "default" which corresponds to "enter" on iOS
    while iOS also supports "Google", "Join", "Route", "Send", "Yahoo" and "Emergency Call".
    Two of the iOS types "Join" and "Send" I would find quite useful in places I'm currenlty using the "go" return key type
    Is there anyway to get the soft keyboard to show this labels on iOS?
    Alternatively it would be great if "join" and "send" are added as Air ReturnKeyType's (e.g. they could default to "go" on other devices)
    Thanks
    [1] ReturnKeyLabel - Adobe ActionScript® 3 (AS3 ) API Reference
    [2] UITextInputTraits Protocol Reference

    I saw that the ReturnKeyType [1] only supports a subset of value possible on iOS [2].
    Basically the supported return key types are "done", "go", "next", "search" and "default" which corresponds to "enter" on iOS
    while iOS also supports "Google", "Join", "Route", "Send", "Yahoo" and "Emergency Call".
    Two of the iOS types "Join" and "Send" I would find quite useful in places I'm currenlty using the "go" return key type
    Is there anyway to get the soft keyboard to show this labels on iOS?
    Alternatively it would be great if "join" and "send" are added as Air ReturnKeyType's (e.g. they could default to "go" on other devices)
    Thanks
    [1] ReturnKeyLabel - Adobe ActionScript® 3 (AS3 ) API Reference
    [2] UITextInputTraits Protocol Reference

  • In Lion return key no longer opens a file! Is there a work around?

    In Lion return key no longer opens a file! Is there a work around?
    In Snow Leoppard I used the return key all the time in finder and Path finder when quickly navigating files. There was the choice of the 2 return keys, one opens the file and the other goes into edit the filename. Now in Lion both keys do the same thing and I miss it badly. It means you have to go to the mouse which (reletively speaking) takes ages.
    Is there a work arround or fix?

    This is a standard setting to change to this to allow users to access the emotions option, this has been like this for some while because the text messages app only allows a number of letters and to add a line break will cause issue with the letter count...  At this time there isnt any way to modify it other than use a 3rd party keyboard but a number of them does this as well.
    Another option that may work is open a email and type the message the way you want it to layout and then copy all text and paste in the text message window, it may keep the original format of the text but I havent tried it myself.
    UPDATE:  Just tried it and you can copy and paste from email and text will keep format...

  • The return key suddenly doesn't work on some forums

    I visit a forum and since upgrading to the latest Java thingy, my keyboard seems to have lost the use of the return key.
    When I'm typing into the message window, it looks fine. When the message has posted, the return key has not registered, not even a space. So all sentences are run together.... I'm wondering how this will look when posted!
    Any ideas?

    OK...
    Install the Mac OS X v10.6.3 v1.1 Update (Combo)
    Then repair disk permissions...
    Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and *restart your Mac*.

  • Enter/return key issue.

    We have a new Macbook Pro and the enter/return key does not work with software unless we push the shift key at the same time. It only does this on one user as well. Other users on the computer the enter/return key works fine. As an example - if you are done with a sentence in Pages and you hit the enter/return button to go to the next line nothing happens unless you also hold the shift key down. Any ideas?

    I have found a solution that works in Excel 2011. But you can try to see if this solution would work for Pages also. Remember, where the instructions below refer to Excel substitute it with Pages instead. From what I am understanding you want to click the RETURN key and move down to the next line in the document. Hopefully it works.
    If you want to click the RETURN key and have the cursor go from the current cell to the the next row in Column A (i.e. The cursor is in cell B2, click RETURN, the cursor moves to A3) do the following:
    1) Click on the Apple logo in the upper left corner of your desktop.
    2) Click SYSTEM PREFERENCES.
    3) Click KEYBOARD.
    4) In the KEYBOARD box click KEYBOARD SHORTCUTS.
    5) Click APPLICATION SHORTCUTS from the left menu.
    6) Click the + (plus sign) that appears to the left of the Restore Defaults
    button.
    6) In the box that appears select EXCEL for the APPLICATION you want to apply this shortcut to. (if Excel does not appear on the list, click on OTHER at the bottom of the list, click MICROSOFT OFFICE, then click EXCEL).
    7) In the MENU TITLE field enter the name you would like to give this shortcut (i.e. ACTIVE CELL). Click the RETURN key(enter) to continue.
    The cursors will now appear in the KEYBOARD SHORTCUT field. Click the RETURN (enter) key once. The shortcut will now appear in the KEYBOARD SHORTCUT field.
    9) Click ADD.
    Now go into the spreadsheet and test the shortcut. Enter information into the spreadsheet into a number of cells in the same row (move between the cells either with the TAB key or RIGHT ARROW), When you are done entering your information, then click RETURN. The cursor should now move to the next row in COLUMN A (i.e. The cursor is in cell B2, click RETURN, the cursor moves to A3).
    Hope it works for you as well as it did for me.

  • Erroneous behavior of return keys in Indesign CS5

    Strange and reproducable serious error of Indesign CS5: Pressing the main return key within a text paragraph doesn't enter a line break but a "new column" break making all text below disappear (and being pushed to the next column or linked text frame), pressing the enter key of the numeric pad strangely enters the "end nested paragraph here" symbol. Trashing preferences (via holding Shift-ctrl-alt-cmd on startup) doesn't help. I managed to get the main return key to work through a custom keybord definition, but it doesn't work with the enter key of the numeric pad (the last key on the bottom right).
    I'm using the trial version of Indesign CS5 on Mac OS X 10.6.3 in German and expect the master collection package I ordered in the mail every day - would be great if Adobe provided a fix to this problem soon.
    Am I the only one experiencing this problem and is it somehow connected to my particular installation or is this a common error?

    Currently, we believe this issue only to affect only the Macintosh OS, German and Swedish versions of InDesign and InCopy CS5. We have published the following KB docs:
    English - http://go.adobe.com/kb/ts_cpsid_84345_en-us
    German - http://go.adobe.com/kb/ts_cpsid_84345_de-de
    Swedish - http://go.adobe.com/kb/ts_cpsid_84345_sv-se

  • In messages, does the return key always 'send' rather than shift to next line/paragraph?

    How may I configure my keyboard or its function so that in 'Messages" pressing the "return" key does not send the message , but moves to the next line.?
    I've looked at preferences etc. but cant seeem to locate an option for the "return" key

        for the       Points.
    8:44 pm      Tuesday; February 25, 2014
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • In Finder, can the "Return" key act as "Open" instead of "Rename" ?

    In Mail the "Return" key act as "Open"
    In iTunes "Return" act as "Play"
    But in Finder "Return" act as "Rename" instead of "Open" ?
    Can we make "Return" act as "Open" ?
    Thanks

    You can try this
    http://pqrs.org/macosx/keyremap4macbook/

  • My "return" key doesn't work

    My "return" key no longer works on my keyboard. When I first started having issues with it, I'd have to make sure to hit the key in the center in order for it to work. Then, that was only working sometimes and I'd have to hit the key pretty hard to get it to work. Now it doesn't work at all. It was never sticky or anything like that, it just seems to have gradually stopped working. It's the only key that I have a problem with, but it's a pretty significant one. For many programs, I'm able to get by using the enter key instead, but that doesn't work for all programs. I was wondering if there was an easy fix to my problem since I don't really have the extra money to replace the keyboard.
    I'm not sure if this is a related problem or not, but in January, my ibook crashed. I could not boot it up without getting the kernel error. When I tried booting it up from the OS disk, it didn't recognize my hard drive, but my hard drive was still recognized in the Disk Utility. I was able to reinstall the OS, but lost everything in the process. The same thing happened again in April. It was around May that I started having the issue with my return key. I've had my iBook since January of 2003 and never had a single problem until this past January.
    Any help/advice/etc. would be appreciated. Thanks in advance.
    ~Tiffany

    Have you tried cleaning underneath the key? Sometimes things get stuck there and the key becomes inoperable. I've used canned air, tweezers, and a small paintbrush to do the job.
    Changing the keyboard is not difficult; in fact, it it one of the few Apple approved DIY repairs. If cost is an issue check on eBay for a replacement.
    Susan

  • Backspace and return keys make phone inoperable

    Whenever I try and try to make a correction using the backspace, the backspace does not stop and erases the entire message. Or if I hit the return key, it doesn't just return to the next line, but repeatedly returns making an infinite number of new lines.
    Basically this problem makes the text, messaging, emails and so on useless - I can read things, but can't use the key board at all.
    I have tried every setting I can find on the phone, nothing seems to correct this.
    What is the fix?
    Solved!
    Go to Solution.

    I had a similar problem with the backspace and the letters A and P it was so annoying.  
    The fix is simple:
    Go into Settings > Accessibility > Magnify > OFF
    This should solve the problem.  If not then you have a different kind of issue.
    Hope it works

Maybe you are looking for

  • Customer statement

    I m creating customer statement .  In BSID and BSAD only closed and open items are avilable .Can anyone suggest me in which table the actual amounts paid by the customer are available. or how to calculate the paid amounts from BSID and BSAD . Thanks

  • Error in Disk Repair - PLS HELP

    Dear All, I have posted a message a week ago, about Error in Verifying Permission and Onyx Error -1. Then ~Bee (thanks for the suggestion, really appreciate it) replied and suggested me to try Disk Repair. I tried it this morning and the result was n

  • Transfer Rented Movies from Apple TV V2 to Computer?!?!

    I rented some movies on my Apple TV. Can I transfer them to my Mac that the Apple TV is synced with? I can't for the life of me figure out how to do this. I know that I can transfer rented movies from the Mac to the Apple TV, but the other way??? Ple

  • Iphoto slide show

    after you create your album and view it on the slide show is it possible to email the slide show?

  • How can I actually talk to customer service?

    How can I actually talk to customer service?