From: Marc P. <ma...@an...> - 2003-08-05 15:59:03
|
On Mon, 04 Aug 2003 18:11:41 -0700, Lane Sharman <la...@op...> wrote: > there is nothing wrong the #if ($testIfVarIsNull) {} construction. And I > like it. I was just proposing it because it: (a) Eliminates use of a temp var if you want to avoid erroneous multiple dereferences (no autocomplete in Templates!), reducing context namespace pollution (b) is a little nicer in that you don't need to refer to the full name of the property within the block. That's all - make templates easier to read and write. > For lax apps, do something like this: > > #bean $map = SparseProperties > $map.FirstName = "Brian" > <input name="FullName" value="$map.FirstName $map.LastName"> That's not always whay you want to do... Marc -- Marc Palmer Contract Java Consultant/Developer w a n g j a m m e r s java and web software design experts with an ethical outlook http://www.wangjammers.org |