Try:

i.category.obj.map(_.name).openOr("Default name")

Cheers, Tim

On 23 Dec 2009, at 21:45, Jim Wise wrote:

> Jim Wise <[email protected]> writes:
> 
>>         "category" -> 
>>           i.category.obj.open_!.name,  // XXX safe unless key rel is corrupt 
>> ?
>>         AttrBindParam("imgUrl", i.url, "src")
> 
> And, since I'm looking at this code, what's the safe way to do this
> (i.e. can I avoid the open_!)?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to