Does your Restaurant class contain getAddress method? Since address is a
public field, u must not have written a getter method for it.
When u say, $r.address, velocity will try to call getAddress method on
object r (provided r is not a hashtable).
In case of hashtable, u can directly use key
#set ( $displayAddr = $p.getDisplayaddressbool())
if($displayAddr)
//if displayAddr is not null
#else
//control will come here if displayAddr is null #end
If the above code is inside a for loop, the u'll have to set $displayAddr to
false at the end of the loop.
#set (