Hi all. I posted about this recently on dev list, but I think I know how to express myself better now...
Anyway, in 4.0 we now have multiple choices : 1. listener="ognl:listeners.formSubmit" 2. listener="listeners:formSubmit" 3. listener="formSubmit" First one is 3.0 compatibile, second and third have apeared in 4.0, and beside being shorter, they also use reflection less, thus are probably a bit faster. IMHO, although the shortest, problematic is third one. Why? Because it is the only one that is not self-descriptive. I requires you to switch to .jwc file to know what type of value that is. True, nobody forces me to use that style, but thing is that I won't be looking only at things developed by myself, but also at other's stuff, and that will force me to switch files. And I think that "listener" example isn't a good one, because whenever we see parameter called "listener", it's a kinda standardized name, and we all know it's a listener parameter, thus default binding has much more sense for that than normally. Let's say you have stumbled upon some .html developed by your co-worker who loves default bindings, and all you see is: <span jwcid="@AttributePresenter" attribute="shortVersion" /> <span jwcid="@Shotter" character="simple" value="parent" /> And although you remember these AttributePresenter and Shotter components because you worked with them 3 weeks ago, you cannot exactly remember now what types of parameters these attribute/character/value are, and you forced to look at their .jwc files :-( Regards, Vjeran ----- Original Message ----- From: "Howard Lewis Ship" <[EMAIL PROTECTED]> To: "Tapestry users" <[email protected]> Sent: Tuesday, May 10, 2005 11:15 PM Subject: Re: 4.0: listeners In the old DTD, there was <binding name="..." expression="..."/> If you are updating the DTDs, you'll have to change <binding>, <static-binding>, <message-binding>, <inherited-binding> to the new, simple <binding> You get to use the same prefixing in the XML file that is used in the HTML. Consistency! But if you go to the trouble of changing your XML files and using the 4.0 DTDs, you have to be aware that the <binding> value attribute is interpreted differently than the 3.0 <binding> expression attribute. On 5/10/05, Patrick Casey <[EMAIL PROTECTED]> wrote: > > Didn't "listeners.formSubmitted" work in 3.0 though? > > So in 3.0: > > <binding name="listener" value="listeners.formSubmitted"/> > <binding name="listener" value="ognl:listeners.formSubmitted"/> > > Both worked. > > In 4.0: > > <binding name="listener" value="formSubmitted"/> > <binding name="listener" value="ognl:listeners.formSubmitted"/> > > So unless I'm misunderstanding this change, we deprecated one of two > 3.0 formats, and introduced one new one. So if you happened to use the old > format (listneres.formSubmitted) and upgraded to 4.0 it'd stop working, > wouldn't it? -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10.5.2005 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
