Dain, This looks good to me.
Others - Any objections to this proposal? If not, I am happy to implement it. Jeff Dain Sundstrom wrote: > On Feb 26, 2006, at 11:09 AM, Jeff Genender wrote: > >> 2) What to do now? >> >> For now, I put in the empty="true" (yes *that* was Dain's idea :D - >> sorry Dain, gotta throw you back under the bus - hehehe - j/k). I >> probably would rather have a value="empty" and a value="remove" and a >> value="null" attribute, or something along those lines...similar to >> Spring. I just think we need an interim solution relatively quick, and >> this was the best I could come up with. Minimally we need the ability >> to "unset" an attribute all together...thats where the empty="true" >> thing came in. But this brought up the ability to force a null and >> empty String to attributes and references. I think using this optional >> attribute keeps things the same as they are today, but offers the >> flexibility to pass what we need to, including removing the value all >> together. >> >> If there is a better idea, then please bring it up...I am open to >> anything. > > I think using the an attribute name "value" will be confusing for spring > users, but it does bring up a better idea... > > 1) Normal value > <attribute name="someAttribute" value="42"/> > <attribute name="someAttribute">42</attribute> > > 2) Don't set... constructor args will be injected with java default values > <reference name="TomcatValveChain"/> > <attribute name="someAttribute"/> > <attribute name="someAttribute"></attribute> > > 3) Inject empty string or pass empty string to property editor and inject > <attribute name="someAttribute" value=""/> > > 4) Inject null > <attribute name="someAttribute" null="true"/> > > -dain
