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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -