On Mar 13, 2008, at 3/139:07 AM , Angelo Chen wrote:
Hi,
As usual I always like to look at new features of every release,
here are
the one officially listed as new to the 5.0.11:
1. The @Cached annotation has been added to allowing the caching of
method
results.
Can't understand this, any use case to explain this?
.java:
public List<DataType> getListOfDataType() {
return someExpensiveMethodCall();
}
.tml:
<t:if test="listOfDataType.size()">
<t:loop source="listOfDataType">
...
</t:loop>
<t:parameter name="else">
No data to display
</t:parameter>
</t:if>
W/out @Cached, the above template results in someExpensiveMethodCall
being called 2x per render. Would be nice to call it only once/render.
So if you change .java to look like:
@Cached
public List<DataType> getListOfDataType() {
return someExpensiveMethodCall();
}
Now someExpensiveMethodCall() will only occur once/render.
2. Tapestry can now generate accessor methods for fields
automatically via
the @Property annotation.
This is a cool feature, saving a lot of code.
3. It is now possible to override the built-in display and edit
blocks for
data types.
What's this?
Tapestry supplies a set of "defaults" for editing & viewing data types
via BeanEditor, BeanEditForm, Grid, BeanDisplay, and so forth.
Now you can override the defaults. As an example, due to licensing
issues, T5 dropped the use of the dynarch calendar in favor of
a simpler javascript calendar with compatible licensing. Suppose you
really want to use dynarch's js calendar.
Before this change, there was no way to supply your own calendar
component in place of Tapestry's default, so even if you had this
pretty jscalendar-based component,
it wouldn't be used, unless you did something like add:
@DataType("customdate") to every one of your date fields, or had a
service that changed the DataType for any bean models you create.
Yuck.
Now, you can override the built-in, and tapestry picks it up. Nice.
Cheers,
Robert
4. Tapestry now supports "Index" pages at the root or in sub-folders.
nice feature.
5. Tapestry pages may now be secured for access only via HTTPS.
good feature.
6. Added the FormFragment component to allow for forms that are
mutable on
the client-side. In addition, the Form component may now update a
Zone.
good feature.
a.c.
--
View this message in context:
http://www.nabble.com/t5%3A-new-features-in-5.0.11-tp16025541p16025541.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]