Review Board 1.5.4

Ajax change from () => Any to () => JsCmd

Updated 2 years ago

Marius Danciu Reviewers
295 dchenbecker, dpp, marius, charles, heiko, joni, atsuhiko, jorge, naftoli, kris, indrajit, alexb
None LiftWeb-archive
It's more consistent for ajax functions to return JsCmd

 
Posted 2 years ago (January 21st, 2010, 2:23 p.m.)
Since ajaxSubmit is brand-new, this makes sense to me. I was unaware that Lift explicitly attempted to match JsCmd, NodeSeq, JsCommands, and LiftResponse as you noted in your mail to the list. It would be helpful to add this to the documentation of the other methods that take functions returning Any; also, would it make sense to have these signatures return a common super-trait (not likely, because of NodeSeq) or else a standard sealed trait with concrete instances wrapping each one of those types?
  1. Should I understand that for this specific defect you meant to check "Ship it" flag? :) The other things you mentioned about Any are subject for a different discussion IMO not for this specific defect.
    
    The way I see it:
    1. The SHtml Ajax function should return JsCmd
    2. The SHtml non Ajax function should return a Unit instead of Any (unless there are compelling reasons to keep Any)