forms - passing password value from view to snippet in lift framework -


i trying create login page in lift framework. have view (a form) , snippet process that. couldn't pass password value view snippet. following code have. view:

<div>  <form class="lift:onsubmit?form=post"> user name: <input name="name"><br> password:  <input type="password" name="pass"><br>  <input type="submit" value="submit">  </form> </div> 

and snippet is:

 object onsubmit {     def render = {      var name = ""      var pass:any = ""            def process() {                    //here performing db actions using normal jdbc         s.notice("pass: "+pass) //here password value couldn't          s.redirectto("/")      }       "name=name" #> shtml.onsubmit(name = _) & // set name      "name=pass" #> shtml.onsubmit(s => asint(s).foreach(pass = _)) &      "type=submit" #> shtml.onsubmitunit(process)  } } 

in password value not passing snippet. can me..thanx in advance.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -