From: Eric R. <eb...@tc...> - 2004-03-09 16:28:50
|
On Mar 8, 2004, at 5:47 PM, Keats wrote: <snip> > 2) FormTool > > Added the ability to set default values for all form elements and/or > for > each form element, eg, > > $Form.DefaultValue = null > $Form.Name.Default = "Guest" > > (The default DefaultValue is now the empty string.) I really don't like the default value being the empty string. Means one can no longer do this: #if($Form.SOME_PARAMETER) { You sent me SOME_PARAMETER=$Form.SOME_PARAMETER } > I deprecated "getPossibleForm" and added a new version called > "getIgnoreCase", so: > > $Form.IgnoreCase.NAME, will retrieve an element called "name", > "Name", > "NAME" etc. (The first one it finds.) I don't like this either. :) It goes against every web/cgi "framework" I've ever used... HTTP parameters are case sensitive. I don't want to see WM promote non-standard usages for something so basic. > I also added isExists(), so the following works regardless of the > default > values: > > #if ($Form.Exists.Name){ ... You need this only because the default value changed. :( When I upgrade our product to WM 2.0, this change alone is going to make me about as upset as Tim is with Melati. I can deal with all the FastWriter/api changes, but this one really bugs me. :) It means re-training my designers on something they've used for about 4 years now. > 3) #try directive <snip> > I remember Eric saying he did this a while ago, but then Brian talked > him > out of it. I'd like to hear the reasoning. I find it quite useful for > validation and debugging. Reason being that nothing you do in a template should actually throw an exception. And if it does, you want it reported. I see this as very similar to the "On Error Resume Next" construct of VisualBasic... very very bad. eric |