Skip to content

Instantly share code, notes, and snippets.

@fbettag
Created January 23, 2012 03:50
Show Gist options
  • Save fbettag/1660415 to your computer and use it in GitHub Desktop.
Save fbettag/1660415 to your computer and use it in GitHub Desktop.
lift-bhtml and lift-bootstrap
val record = MyMapper.find(By(MyMapper.id, 5))
BHtml.text[Long, MyMapper](record)
val enableSubmitJs = JsRaw("""$('.stuff').removeAttr('disabled')""")
val disableSubmitJs = JsRaw("""$('.stuff').attr('disabled', 'disabled')""")
val record = MyMapper.find(By(MyMapper.id, 5))
BHtml.text[Long, MyMapper](record.name, false, enableSubmitJs, disableSubmitJs)
val record = MyMapper.find(By(MyMapper.id, 5))
SHtml.ajaxText(record.name.is, (v: String) => { record.name(v).save; Noop })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment