Just finishing up the changes to integrate the latest OGNL into Tapestry.

Previously, there were efficiency advantages to using <static-binding> and
<field-binding> over <binding> with a constant expression (such as 'true',
'false', '42', or '@SomeClass@SomeField').  Tapestry was able to recognize
that static-binding and field-binding were invariant.

There now is NO advantage to using field-binding or static-binding over
binding.  ONGL 2.1.13 includes the hooks that allow Tapestry to determine
that those constant expressions are, in fact, invariant.

<field-binding> will likely get deprecated in the future.
<static-binding> is still somewhat useful; it is more convienient for larger
blocks, and doesn't require the somewhat awkward (in XML) quoting of string
values.

Examples (each pair is equivalent):

<field-binding name="validator"
field-name="net.sf.tapestry.valid.StringValidator.REQUIRED"/> and
<binding name="validator"
expression="@net.sf.tapestry.valid.StringValidator@REQUIRED"/>

<static-binding name="displayName" >String Field</static-binding> and
<binding name="displayName" value="&quot;String Field&quot;"/>

<field-binding name="invert" field-name="Boolean.TRUE"/> and
<binding name="invert" expression="true"/>


----
Howard Lewis Ship
[EMAIL PROTECTED]
http://tapestry.sf.net




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to