You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Carlos Vladimir Villarroel <mu...@gmail.com> on 2007/11/02 23:09:18 UTC
Musicoder's Fast DatePicker/Calendar component for Tapestry 3 and 4
Hello all, just out of curiosity I began to test the latest Tapestry 4 jars
(I've not downloaded Tapestry since 3.1) and noticed the DatePicker
component has evolved: now the "Clear" button is localizable, there is an
initialization function for readability and some tune ups. Unfortunately it
does not work in Opera, IE5 and still has some issues: triggers the infamous
IE6 JavaScript memory leak and renders pretty slow when using multiple
calendars/date fields, as some users pointed out back then:
Subject : . issues with many date pickers in a page - Date: Thu, 03 Nov
2005 - Message: "...on a dev. system, with 2 date fields, avg. page
rendering time is 245ms and without date fields, it is 5ms..."
I have not done any Tapestry component development recently, but my old
components appear to perform very acceptably in production, in particular,
this customized DatePicker component takes less code and makes complex page
rendering with -many- calendars (i.e. a dynamic dashboard) almost
instantaneous (even in old Pentium II machines were the standard component
is unbearably slow). Who knows, it might be of help for some of you before
T4 reaches its end-of-life (and before I lose all my old sources :)
Component: Fast DatePicker, aims to replace the standard Tapestry 3 and 4
DatePicker
Autor: Carlos Vladimir Villarroel a.k.a. Musicoder, based on Tapestry
DatePicker.
Information: Tested on production since 2005 using Tapestry 3.0 and 3.1 (now
4) with IE 5,6,7, Opera 8,9 and Firefox. A 21-calendar page in IE renders
instantly. *
* The standard DatePicker component takes initially over 4-5 seconds on a
Pentium IV and is progressively slower on IE6. It performs better and is
more stable under IE7, but still too slow for agile page browsing.
Installation: Stop your server, copy the attached files (DatePicker.script
and DatePicker.js) to your tapestry-jar-file/org/apache/tapestry/form
(replacing the two files) and restart.
If you have Time Zone Offset issues in the client, try replacing the 0 in
the .script file (ln:53, col:76) with your TZO in ms.
To make it work with Tapestry 4.1 (Dojo) you must change two lines in the
.script file, I left this as an exercise to the user.
Thanks for reading; I'm a long time Tapestry enthusiast, inactive online but
very active offline -if someone is interested I may be able to find and
document other components lying in my old PC. I'm now moving elsewhere so I
just wanted to say hi before leaving. It's been a pleasure to be a part of
this community.
- Musicoder