From: Lane S. <la...@op...> - 2004-03-09 04:56:20
|
see inline... Keats wrote: >I've been playing around with some new stuff for WM and I thought I'd >solicit some feedback: > >1) CookieTool > >added the ability to set attributes by adding a setNew() method, so now you >can say: > > #set $Cookie.New.Dohicky = "My little dohicky." > > #set $aCookie.Domain=".acme.com" > #set $aCookie.Path="/" > #set $aCookie.MaxAge=365*24*60*60 > What is $aCookie? A simple map??? > $Cookie.add($aCookie) > >I also created a wrapper for the Cookie that does stuff like automagically >URL encode/decode the value if necessary. > Nice. What do you think of #set $OrgStore.Entry = $Org #set $UserStore.Entry = $User #set $Org = $OrgStore.OpenDoors #set $User = $UserStore.Keats as a persistent store. This is a VLH object which is a map. The objects $Org and $User have to expose their key value via an interface. Would you use this? > > >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 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.) > That's nice when you are doing manual mapping and you screw up the typing. But, I have always wanted to complete an organic framework for form processing. Something that would povide some default processing and storage capability so that out of the box you could use it and then augment it with WM script and some POJOs. > >I also added isExists(), so the following works regardless of the default >values: > > #if ($Form.Exists.Name){ ... > > >3) #try directive > >Simplified version of the Java construct. #try without #catch works kind of >like the old #silent directive. If you specify #catch you get a local >$ERROR variable: > >#try >{ > #set $Customer.Category = $cat >} >#catch >{ > #set $Customer.Category="INVALID" >} > >[Note: you pretty much need to use the CrankyEEH with this.] > >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. > >Let me know what y'all think. > I think these are excellent improvements. Possibly for 2.1 but maybe not. Also, I would like to see more construction aids: a) An RSS Reader b) A Form Builder, Deployer and Processor. See http://www.webmacro.org/BlockLevelExpressionism and the code example under the conclusion header 2/3rd down the page for the deployer part. c) The use of WebMacro to assist in content organization, classification and presentation. d) Some more work with Melati which is the best WebMacro "Platform" I have seen in the sense that you have with Melati an industrial strength engine for building complete web applications with tight WM integration. An Ignition completed. Sorry, Marc. -Lane > >Keats > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Webmacro-devel mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |