Access entity within Lift Scala net.liftweb.util.Box object -
i have net.liftweb.util.box object returned result of search on user id. box object returns like:
net.liftweb.util.box[myentity{attributes}]
how can access entity within box? in particular, want access attributes of entity inside box.
please see http://lift.la/scala-option-lift-box-and-how-to-make-your-co
you can access contents of box within foreach/map method invocation. example if wanted name out of entity:
myboxedentity.map(_.name) openor "no name provided"
if box full, you'll entity name otherwise, you'll message.
Comments
Post a Comment