• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

reset button

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for my login page, i have a reset button to clearup the loginname and password fields.

the reset button doesn't work,if the submit button is clicked.
In this case, the user can not logon and the errormessage occurs. In the loginname field the old value (the last value before i click the logon button) still exists. When i click the reset button, Nothing changes. When i fill a new value in the loginname field and click reset, the last value before i click the logon button occurs again.

in the userBean i add the methode

public void reset(){
setName("");
setPassword("");
}
in jsp site:
<h:commandButton id="reset" value="#{txt.reset}" action="#{user.reset}"/>

Can someone tell me why?
 
Mimi Cha
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have solved the problem by myself.
i just set the value of loginname="" by submitbutton.
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic