JSF Portlet input text enter key submission

Hi,
I have a portlet having input text fields and having command action button(hx:commandExButton). But I have a requirment when I presss enter key in the input text fields instead of submitng form, I want submit command action button.
Could you please give the details. how I will do in JSF Portlets (code snipeet).
Currently I implemented when user press enter key I am calling java script function and submit the form.
Thanks

Firstly: why using IBM's hx:commandButton instead of standard RI h:commandButton?
Well, pressing [enter] somewhere in a inputfield usually invokes the firstnext button in the form. Doesn't this happen in your form? Or is the "wrong" button being invoked?

Similar Messages

  • Table Control[Accept Input Only] - "ENTER" Key

    Hi Folks,
    I'm reviving this unanswered thread in relation to table control: when the user press enter, all the values entered disappear.
    [url]Re: Table control (Enter key)[url]
    I have a table control that accepts "ONLY" input, meaning to say, there will be no pre-loading of data in the PBO, so it will loop through the table control itself instead of looping from an internal table.
    Issue: Whenever I press "ENTER" in any column/row of my table control, ALL the values I entered disappear.
    PBO:
    PROCESS BEFORE OUTPUT.
      MODULE CLEAR_OKCODE.
      MODULE LOAD_TABLECTRL.
      LOOP WITH CONTROL TC_DATA.
        MODULE READ_DATA.
      ENDLOOP.
    module READ_DATA output.
      READ TABLE T_DATA INTO WA_DATA INDEX TC_DATA-current_line.
      data : line_count type i.
      "to increase the number of lines in table control dynamically
      describe TABLE t_data lines line_count.
      TC_DATA-lines = line_count + 10.
    endmodule. 
    PAI:
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL TC_DATA.
        MODULE MODIFY_DATA.
      ENDLOOP.
    module MODIFY_DATA input.
    WHEN 'CREATE'.
      "subroutines are here, etc.
    WHEN 'DELETE'.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
    endmodule.
    In my ABAP Debug, the value of SY-UCOMM is BLANK whenever I press Enter.
    Thanks.

    Hi
    Your code seems to be rght only the MODIFY statament is useless:
    module READ_DATA output.
      READ TABLE T_ID_CHECK INTO WA_ID_CHECK INDEX TC_ID-current_line.
      IF SY-SUBRC EQ 0.
        ZQID_CHECK-WERKS = WA_ID_CHECK-WERKS.
        ZQID_CHECK-MATNR = WA_ID_CHECK-MATNR.
        ZQID_CHECK-LICHA = WA_ID_CHECK-LICHA.
        ZQID_CHECK-LIFNR = WA_ID_CHECK-LIFNR.
      ELSE.
        CLEAR ZQID_CHECK.
      ENDIF.
    endmodule.
    Now before LOOP of PBO try to set the lines of table control to be display, I've created this report on my system and it works fine:
    .CONTROLS T_CTRL TYPE TABLEVIEW USING SCREEN 100.
    DATA: BEGIN OF ITAB OCCURS 0,
              WERKS LIKE MARC-WERKS,
              MATNR LIKE MARC-MATNR,
              LIFNR LIKE LFA1-LIFNR,
          END   OF ITAB.
    DATA: WA LIKE ITAB.
    START-OF-SELECTION.
      DO 4 TIMES.
        ITAB-WERKS = '5010'.
        ITAB-MATNR = '1234567890'.
        ITAB-LIFNR = '0000000001'.
        APPEND ITAB.
      ENDDO.
      CALL SCREEN 100.
    PROCESS BEFORE OUTPUT.
      MODULE SET_T_CTRL.
      LOOP WITH CONTROL T_CTRL.
        MODULE READ_DATA.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL T_CTRL.
        MODULE MODIFY_DATA.
      ENDLOOP.
    MODULE SET_T_CTRL OUTPUT.
      DESCRIBE TABLE ITAB LINES T_CTRL-LINES.
    ENDMODULE.                 " SET_T_CTRL  OUTPUT 
    MODULE READ_DATA OUTPUT.
      READ TABLE ITAB INDEX T_CTRL-CURRENT_LINE.
      IF SY-SUBRC = 0.
        MOVE-CORRESPONDING ITAB TO WA.
      ELSE.
        CLEAR WA.
      ENDIF.
    ENDMODULE.                 " READ_DATA  OUTPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY ITAB FROM WA INDEX T_CTRL-CURRENT_LINE.
      IF SY-SUBRC NE 0.
        CHECK NOT WA IS INITIAL.
        APPEND WA TO ITAB.
      ENDIF.
    ENDMODULE.                 " MODIFY_DATA  INPUT

  • Text entry boxes in CP6 - Enter key to validate input does not work in Safari?

    I'm using Captivate 6 to create a step by step walkthrough of some different processes that are commonly completed in my workplace. Some of the example processes have portions where text is entered to simulate a process the end user might need.  I have text entry boxes in these slides that require validation of the input to move along, with Enter used as a shortcut key. This works great in Firefox, Chrome and IE all the way down to 8....but if the course is run in Safari, the enter key does nothing.  Is this a known issue?
    Additional info: For many of these text entry boxes, the point is that it is a search field that has a little binoculars icon next to it that executes the search in the actual software we are simulating. For these slides I actually have the submit button associated with the text box made invisible (no fill, no stroke) and placed on top of the binoculars icon. This is an acceptable method of doing the task we're demonstrating, and just so happens to be a workaround for the enter key not working in Safari. However, a few places we have text entry that doesn't have the search/binocular icon next to it because there is a different goal on that section of the software we're visualizing. In those cases, there is no place for me to put an invisible submit button, and I can't make the submit button visible because that's not how the software we're demonstrating would work (thus defeating the purpose of the training).

    Sorry, this is a known bug with no fix available yet, but the makers of SwiftKey are aware of it and we will work with them to fix it: https://bugzilla.mozilla.org/show_bug.cgi?id=617298
    For now, the only solution is to use a different keyboard when using Firefox.

  • First Text field in page submits when Enter key is hit. Don't want Submit

    Hi,
    I have searched and can't find this answer I got before...
    The Text field does not have the Submit always when pressed included, just a standard Text Item.
    because it is the first text field in the page.. or maybe it was because its the only text field on the page that causes it to "Submit" the page when the "Enter" key is pressed.
    I do not want the Enter key to Submit the page.
    Was it to add a dummy hidden text field before this text field?

    Awesome... I just found a post also with same answer!
    Thank you very much!
    http://djmein.blogspot.com/2007/04/stop-page-submission-when-enter-is.html

  • Disable ENTER KEY on text item

    All,
    I am trying to disable SUBMIT on ENTER KEY for a text item on a page as below but still its submitting how can i achieve this.
    I want the page to totally disable the enter key so when i press ENTER KEY nothing happens,
    what i did:
    1. when page loads,
    $("input").keypress(function evt) {
    var charCode = evt.charCode || evt.keyCode;
    if (charCode  == 13) {
    return false;
    2.
    Submit when Enter pressed
    NO
    APEX 4.2
    thank you.

    Hi,
    Your code is not valid.
    I'm sure it raises errors.
    Place to page JavaScript -> Execute when Page Loads
    $("input,select").keypress(function(e){
    return e.keyCode!==13;
    Regards,
    Jari

  • Clearing the TextArea texts when I press Enter key

    How to clear the texts that I have typed into the TextArea when I press Enter Key?
    I have now added a TextArea instance called input_txt to the stage and added an component event listener to detect when I press enter key. Then an event fires up which first reads the input to a string variable.
    But next I need to automatically clear the texts in the TextArea.
    How to do that?
    function readInput(event:Event):void
        input = input_txt.text;
        trace(input);
        // removing texts in the text input area-------- how?
    input_txt.addEventListener(ComponentEvent.ENTER, readInput);
    Please help.
    Thank You

    ComponentEvent.ENTER occurs before the line feed is added to the text, and is not cancelable, so you'll probably need to set a flag and do the clearing in an Event.CHANGE handler. Something like this:
    import fl.events.ComponentEvent;
    input_text.addEventListener(ComponentEvent.ENTER, readInput);
    input_text.addEventListener(Event.CHANGE, changeHandler);
    var clearing:Boolean=false;
    function readInput(event:Event):void
        input = input_txt.text;
        trace(input);
        clearing=true;
    function changeHandler(event:Event)
    if(clearing)
      input_text.text="";
      clearing=false;

  • How Can i send the data entered in Input text fields to e-mail?

    Iam Jennifer, Iam having a doubt in Flash, I hope that you
    are going to solve my problem, Iam taking 3 Static text fields as
    Name, Age and Country and besides each and every static text fields
    i have taken 3 input text fields with different instance names,
    when i enter my Name, Age and Country details in the input text
    fields and after entering those details if user clicks the submit
    button the data should be send to some mail address, is it possible
    Im not so good at action script, but i hope that any one can
    help me...
    Iam attaching the action script code also, please find the
    attachment below, the actions are given to button.
    Attach Code
    Btn.onPress = function ()
    mail_lv = new LoadVars();
    mail_lv.dummy1 = "";
    mail_lv.subject = "Details";
    mail_lv.message = "hi";
    mail_lv.username = "name_txt".text;
    mail_lv.age = "age_txt".text;
    mail_lv.country = "country_txt".text;
    mail_lv.onLoad = function ()
    trace("Sent successfully...");
    trace("mail_lv.subject = " + mail_lv.subject);
    trace("mail_lv.message = " + mail_lv.message);
    mail_lv.send("mailto:[email protected]", "_blank");

    The names of your variables, "name_txt", for instance, should
    NOT have quotes around them. Use:
    mail_lv.username = name_txt.text;
    mail_lv.age = age_txt.text;
    mail_lv.country = country_txt.text;

  • I need to reprogram the delete and enter key to the left side of a external keyboard for the ipad mini. don't need the caps/lock or ctrl key and due to an injury my daughter can only use her left hand to type. She is using a text to speech app to verbaliz

    I need to reprogram the delete and enter key to the left side of a external keyboard for the ipad mini. I don't need the caps/lock or ctrl key. Due to a brain injury my daughter can only use her left hand to type. She also uses a text to speech app to verbalize all of her needs since her speech isn't intelligible any longer either. And her vision was significantly affected also, so the keyboard has to be mounted about 6 inches from her face. So to reach across the keyboard with her left hand to the right side delete and enter button is physically difficult and causes typing errors, which cause people to not understand what shes trying to say.
    The best keyboard so far is the Zagg folio mini. I just had to make stickers to enlarge the letters on the key buttons.
    Does anyone know how I can reprogram these two keys? Or where I can buy a wireless mini keyboard for Ipad made for lefthanders with these two functions on the left side. I have searched for days and days. It's sooooo important to me that she be able to contribute her voice again. Imagine if you got in a car accident and couldn't speak clearly any longer, but understood everything still. Thanks for any help and suggestions you all take the time to share with me. I really appreciate the kindness of strangers to help me help my daughter.
    Sami's mom

    Sami\'s mom wrote:
    I need to reprogram the delete and enter key to the left side of a external keyboard for the ipad mini.
    You cannot.

  • 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

  • How to enter local language in ADF Input Text?

    Hai,
    Iam using jdev 11g.
    There is an Input Text in my jspx page.
    I want to enter the data in that field according to the regional settings language.
    can anyone please help.
    Briston Thomas

    hai,
    In the database,the field is set as NVARCHAR2 .If i copy paste and commit the corresponding language word directly to database,it is showing correctly when fetching in to text field...If i directly paste the word in the text field and saved,the data is showing differenly after fetching from DB..Why is it happens..Is it related to DataBase settings?..please advise..

  • Auto submit input text doesnt show message after enter

    I have a page in jdeveloper 11 an input text with the attribute autosubmmit=true...
    When I write error entrance in the inputtext and press enter, the message is shown and the alert is given. but if I press enter again, the alert message disappears.
    What can I do For this message not to disappear?
    islam.

    Thanks for your reply. I don't know why there is another topic from me, but it is already solved
    Input text components become blank after Submit button clicked

  • Flex4.5 SDK under Flash builder Burito doesnt dispatch Enter key event in Text Area anymore

    Flex 4.5 under Flash builder Burito doesnt dispatch 'Enter' key event in Text Area anymore, in prev version 4.1 it was working properly, this stopped working after migration to Burito + Flex SDK 4.5?
    What that suppose to be?

    Hi
    That's true that Flex4.5 SDK under Flash builder Burito doesn't listen Enter key in Text Area for KeyUp or KeyDown event.
    Here I found a work around you can use.
    Add an eventlistener to the component in actionscript and set the useCapture=true next to eventlistener function. Now you can listen enter key for KeyUp or KeyDown Event
    Hope this helps
    Rush-me

  • JSF Disable Enter key on h:inputText......

    Hello All,
    Hope all of you are doing good. Currently we are using JSF 1.1 for our new application, i have got a requirement as follows. This is a weird problem i hope....
    I have a <h:inputText....> component in my page and when if user presses "Enter" key the page is getting submitted. I have tried by adding the following lines of Javascript code but still it is not working. Could you please review and suggest me on this.
    function kH(e) {
         var pK = e ? e.which : window.event.keyCode;
         return pK != 13;
    document.onkeypress = kH;
    if (document.layers) document.captureEvents(Event.KEYPRESS);
    Any suggestions are really appreciated. Thanks in advance.

    Try this and see how it works for you:
    <script language="JavaScript">
    function disableEnterKey(e)
         var key;
         if(window.event)
              key = window.event.keyCode;     //IE
         else
              key = e.which;     //firefox
         if(key == 13)
              return false;
         else
              return true;
    </script>
    <h:inputText onkeypress="return disableEnterKey(event)" />

  • Enter Key Not Working When Using Text Tool

    For some reason, my enter key has stopped working when using the text tool.  Instead of making a soft return to a new line, it simply commits the type. What is going on here?
    I'm using a desktop and CS3.

    there are 2 enter keys in key board
    if u enter main key board enter, sentence will go to next line
    In case u enter the key  available in  rightside of the key board , in the cluster of numericals, the type tool is committed.

  • JSF 2.0 ajax : Submit form  on Enter key press in h:inputTextarea

    Dear All,
    I am new to JSF 2.0 . Just wanted to submit the form in ajax when a user hits the "Enter": key while typing
    in the h:inputTextarea . I would be very thankful to you guys if you help me out.
    Thanking in advance!

    I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
    The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
    The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
    The second time the view state hidden field is updated or created but only under the following condition:
    Comment in the JavaScript source code of the jsf.js
    //Now set the view state from the server into the DOM
    //but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
    In the following way it is working:
    page1.xhtml
    <h:form id="myform">
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form id="myform">
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>So always set an explicit id for each JSF tag.

Maybe you are looking for

  • EBS Resposibility mapping to Roles in EM without EBS SSO

    Hello All, I have a hard time on figuring out how to implement data level security in OBIEE 11g. We are implementing OBIEE 11g with EBS r12 source ( NOT OOTB) . The EBS ICX based integration has NOT been used instead SSO is achieved thru Windows Nati

  • Can I make an active TOC in Acrobat 9 or 10 for an ebook?

    Hi. I have a small publishing company and would like to use Acrobat to create ebook files but I can't seem to create an active TOC as part of the ebook document. Can this be done in Acrobat 9 or 10 versions? Also can I do this with an existing PDF cr

  • Link to query on the web not working. Please help.

    hi gurus, We have a few queries which can be viewed thru our internal Web page. These are links to the actual queries on the BW BEx PRD server. These links were good sometime back. Now when we click them, we can see the URL blinking, trying to connec

  • Realtime http compression  in pe8 ?

    is there any way to realtime compress the html from pe8 ? or is there any other j2ee server that supports this ? regards gustav

  • For CS2 - Unwarping a photographed 8.5x11" page

    For CS2 How do I take a photographed 8.5x11" page that is not symmetrical in the photo and "unwarp" it so that it fits properly into an 8.5x11" image? Please help with clear instructions.  I'm not a PS newbie, but I suspect this will have a lot of va