Joda-Time (With EJB3) Page

Some developers prefer to use Joda-Time instead of Java's date and time classes.
Joda-Time can be used with Tapestry with the help of two components provided by JumpStart: InsertDateTime and DateMidnightPicker.
This page demonstrates the InsertDateTime component. It's similar to Insert, but it understands Joda Time's formatting.

First, we use InsertDateTime to display a database field: table DateStuff contains a column called dateMidnight. It's stored as an SQL DATE but the DateStuff object exposes it as a DateMidnight field. Here is InsertDateTime being used to render the DateMidnight field in various styles...

jwcid="@InsertDateTime": date
jwcid="@InsertDateTime" style="S-": date
jwcid="@InsertDateTime" style="M-": date
jwcid="@InsertDateTime" style="L-": date
jwcid="@InsertDateTime" style="F-": date
jwcid="@InsertDateTime" formatter="ognl:french": date
jwcid="@InsertDateTime" formatter="ognl:ISODate": date

Some features of InsertDateTime: Here is InsertDateTime being used with all 5 main Joda-Time types:

DateMidnight, style="L-": date
DateTime, style="LL": datetime
LocalDate, style="L-": date
LocalTime, style="-L": time
LocalDateTime, style="LL": datetime

To Page 2

To Login