Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 64885 invoked from network); 29 Sep 2008 18:02:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2008 18:02:59 -0000 Received: (qmail 42558 invoked by uid 500); 29 Sep 2008 18:02:52 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 42527 invoked by uid 500); 29 Sep 2008 18:02:52 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 42516 invoked by uid 99); 29 Sep 2008 18:02:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 11:02:52 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gregory.d3@gmail.com designates 64.233.182.190 as permitted sender) Received: from [64.233.182.190] (HELO nf-out-0910.google.com) (64.233.182.190) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 18:01:52 +0000 Received: by nf-out-0910.google.com with SMTP id c7so802346nfi.26 for ; Mon, 29 Sep 2008 11:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=Gl8gr6Dpq6VRVWqCexE3IHFtuqoXsJAOjdOWUPBiiBg=; b=bS1BAETrTjZECCzjsQN/Q+ZMb8WrUoeE7gKIBCUAeN1StUSLDYF+SleejZfVyRjdQH GaVYGHdUhL2abFMl5iKXN/WS6QAGRUHGtrU27JlD2JtSI94M7R/hFNWmvOj36yIDynAu 1xRI9qN6ryp6v6cbG4wfdTck+5jah14Lc5JNA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=jCB7zndZMpQxHNpd0eWZ4Ku1V48cc71zaqEt1rZQyHvOtBU79WsaYES6yZ2jKPlgkh B6+WVJp6hEATkZ3bD244ui+nN22Onq0IAnL3MWzjpdOBP2Q8Jfakaed931GQWiDx4QbQ H+i6taKGXfp+tbr+0vbfACrnbrJCz0Hqbi0wA= Received: by 10.210.116.14 with SMTP id o14mr6626295ebc.8.1222711345069; Mon, 29 Sep 2008 11:02:25 -0700 (PDT) Received: by 10.210.80.14 with HTTP; Mon, 29 Sep 2008 11:02:25 -0700 (PDT) Message-ID: <9d6230450809291102k7e977d7dya88b4df53bb62fa4@mail.gmail.com> Date: Mon, 29 Sep 2008 20:02:25 +0200 From: Grzesiek To: "MyFaces Discussion" Subject: Re: Myfaces action on pressing Enter Key In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37928_18786989.1222711345069" References: <19694686.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_37928_18786989.1222711345069 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline If you press 'enter' when your cursor is on form field, the form will be submited - no problem - so I suppose that it's NOT what you are thinking about. BUT If you would like to submit form whenever enter is pressed, the only one way is to use javascipt and sth like 'click hidden link'. regards Grzesiek 2008/9/26 Jalapati, Nagendra > Hello Friends, > > How to call managed bean action on pressing Enter Key on the key board? > > I have a simple form with a text field and button. When user hits enter > key on the key board I should be able to call searchBean.orgSearch (same > action as commandButton) > > I am using Myfaces1.1 > > > > > > value="#{searchBean.employeeName}"> > >    id="name_btn" type="submit" > action="#{searchBean.orgSearch}"> > > > > > > All suggestions are welcomed... > > Nag > ------=_Part_37928_18786989.1222711345069 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
If you press 'enter' when your cursor is on form field, the form will be submited - no problem - so I  suppose that it's NOT what you are thinking about.

BUT If you would like to submit form whenever enter is pressed, the only one way is to use javascipt and sth like  'click hidden link'.

regards
Grzesiek


2008/9/26 Jalapati, Nagendra <nagendra.jalapati@philips.com>
Hello Friends,

How to call managed bean action on pressing Enter Key on the key board?

I have a simple form with a text field and button. When user hits enter
key on the key board I should be able to call searchBean.orgSearch (same
action as commandButton)

I am using Myfaces1.1

<f:view>
<h:form id="searchForm">
<tr>

<td><h:inputText id="empName" size="30"
value="#{searchBean.employeeName}"></h:inputText></td>

<td>&nbsp;&nbsp;<h:commandButton styleClass="button" value="Go"
id="name_btn" type="submit"
action="#{searchBean.orgSearch}"></h:commandButton></td>

</tr>
</h:form>
</f:view>

All suggestions are welcomed...

Nag

------=_Part_37928_18786989.1222711345069--