• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Login Problem

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i had written a login page in jsf with fields UserName and Password.
Now i had two buttons named Login and Clear.
When i enter username and password values and press enter key nothing is happening. i mean the submit is not happening. but when i press the login button it is being submitted.

Now i want like after i enter password and press Enter button, the submit needs to happen.
Please help me in this matter.

here is the login page jsf code:

<h:form id="mainFrm" >
User Name:<h:inputText id="username" value="#{loginBean.userName}"
required="true" maxlength="30" />
Pasword: <h:inputSecret id="passwordd" value="#{loginBean.password}" required="true" maxlength="30" />
<h:commandButton action="#{loginBean.authenticateUser}"
value="Login" styleClass="button" />
<h:commandButton type="reset" value="Clear"
styleClass="button" />
</h:form>
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ramesh Etta:
Hi,

i had written a login page in jsf with fields UserName and Password.
Now i had two buttons named Login and Clear.
When i enter username and password values and press enter key nothing is happening. i mean the submit is not happening. but when i press the login button it is being submitted.

Now i want like after i enter password and press Enter button, the submit needs to happen.
Please help me in this matter.

here is the login page jsf code:

<h:form id="mainFrm" >
User Name:<h:inputText id="username" value="#{loginBean.userName}"
required="true" maxlength="30" />
Pasword: <h:inputSecret id="passwordd" value="#{loginBean.password}" required="true" maxlength="30" />
<h:commandButton action="#{loginBean.authenticateUser}"
value="Login" styleClass="button" />
<h:commandButton type="reset" value="Clear"
styleClass="button" />
</h:form>

 
Sanjay Chavan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sanjay Chavan:
[QB][/QB]



I have tried with your code.
Its working fine on my system.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ramesh,
I also tried with your code and its working for me too.


Thanks
Vikas
 
no wonder he is so sad, he hasn't seen this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic