You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jeshurun Daniel <sj...@yahoo.ca> on 2013/04/17 05:58:58 UTC

Re: date field as 3 drop down fields

I had the same requirement today and found a version here in the mailing lists, but had some problems with it when used inside a loop.

So I rolled my own and posted the code here. It hasn't been tested thoroughly, please feel free to suggest improvements to the code.

________________________________

From: "captain_rhino" <gr...@axa-travel-insurance.com>
To: users@tapestry.apache.org
Sent: Tuesday, 6 December, 2011 3:25:48 AM
Subject: date field as 3 drop down fields

I am looking to implement a date field as 3 separate drop downs lists of day,
month and year in T5.   Has anyone already developed a component that does
this?

--
View this message in context: http://tapestry.1045711.n5.nabble.com/date-field-as-3-drop-down-fields-tp5051531p5051531.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

Re: date field as 3 drop down fields

Posted by Bård Magnus Kvalheim <ma...@kvalheim.eu>.
True that - learned the hard way :(

Using a threadlocal is quite convenient as well.
http://stackoverflow.com/questions/817856/when-and-how-should-i-use-a-threadlocal-variable
http://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html



On Thu, Apr 18, 2013 at 12:15 AM, Lance Java <la...@googlemail.com>wrote:

> Unfortunately, java.text.SimpleDateFormat is not thread safe so can't be
> declared as static. You'll need to use a local variable each time to be
> thread safe unfortunately.
> On 17 Apr 2013 05:06, "Jeshurun Daniel" <sj...@yahoo.ca> wrote:
>
> > One more time with the links
> >
> >
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Date-Field-with-day-month-year-and-datepicker-component-td4618810.html
> >
> >
> http://blog.jeshurun.ca/technology/tapestry-5-datefield-as-3-select-dropdowns
> >
> >
> >
> >
> > ________________________________
> >  From: Jeshurun Daniel <sj...@yahoo.ca>
> > To: Tapestry users <us...@tapestry.apache.org>
> > Sent: Tuesday, April 16, 2013 9:58:58 PM
> > Subject: Re: date field as 3 drop down fields
> >
> >
> >
> > I had the same requirement today and found a version here in the mailing
> > lists, but had some problems with it when used inside a loop.
> >
> > So I rolled my own and posted the code here. It hasn't been tested
> > thoroughly, please feel free to suggest improvements to the code.
> >
> > ________________________________
> >
> > From: "captain_rhino" <gr...@axa-travel-insurance.com>
> > To: users@tapestry.apache.org
> > Sent: Tuesday, 6 December, 2011 3:25:48 AM
> > Subject: date field as 3 drop down fields
> >
> > I am looking to implement a date field as 3 separate drop downs lists of
> > day,
> > month and year in T5.   Has anyone already developed a component that
> does
> > this?
> >
> > --
> > View this message in context:
> >
> http://tapestry.1045711.n5.nabble.com/date-field-as-3-drop-down-fields-tp5051531p5051531.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
>

Re: date field as 3 drop down fields

Posted by Lance Java <la...@googlemail.com>.
Unfortunately, java.text.SimpleDateFormat is not thread safe so can't be
declared as static. You'll need to use a local variable each time to be
thread safe unfortunately.
On 17 Apr 2013 05:06, "Jeshurun Daniel" <sj...@yahoo.ca> wrote:

> One more time with the links
>
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Date-Field-with-day-month-year-and-datepicker-component-td4618810.html
>
> http://blog.jeshurun.ca/technology/tapestry-5-datefield-as-3-select-dropdowns
>
>
>
>
> ________________________________
>  From: Jeshurun Daniel <sj...@yahoo.ca>
> To: Tapestry users <us...@tapestry.apache.org>
> Sent: Tuesday, April 16, 2013 9:58:58 PM
> Subject: Re: date field as 3 drop down fields
>
>
>
> I had the same requirement today and found a version here in the mailing
> lists, but had some problems with it when used inside a loop.
>
> So I rolled my own and posted the code here. It hasn't been tested
> thoroughly, please feel free to suggest improvements to the code.
>
> ________________________________
>
> From: "captain_rhino" <gr...@axa-travel-insurance.com>
> To: users@tapestry.apache.org
> Sent: Tuesday, 6 December, 2011 3:25:48 AM
> Subject: date field as 3 drop down fields
>
> I am looking to implement a date field as 3 separate drop downs lists of
> day,
> month and year in T5.   Has anyone already developed a component that does
> this?
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/date-field-as-3-drop-down-fields-tp5051531p5051531.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

Re: date field as 3 drop down fields

Posted by Jeshurun Daniel <sj...@yahoo.ca>.
One more time with the links
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Date-Field-with-day-month-year-and-datepicker-component-td4618810.html
http://blog.jeshurun.ca/technology/tapestry-5-datefield-as-3-select-dropdowns




________________________________
 From: Jeshurun Daniel <sj...@yahoo.ca>
To: Tapestry users <us...@tapestry.apache.org> 
Sent: Tuesday, April 16, 2013 9:58:58 PM
Subject: Re: date field as 3 drop down fields
 


I had the same requirement today and found a version here in the mailing lists, but had some problems with it when used inside a loop.

So I rolled my own and posted the code here. It hasn't been tested thoroughly, please feel free to suggest improvements to the code.

________________________________

From: "captain_rhino" <gr...@axa-travel-insurance.com>
To: users@tapestry.apache.org
Sent: Tuesday, 6 December, 2011 3:25:48 AM
Subject: date field as 3 drop down fields

I am looking to implement a date field as 3 separate drop downs lists of day,
month and year in T5.   Has anyone already developed a component that does
this?

--
View this message in context: http://tapestry.1045711.n5.nabble.com/date-field-as-3-drop-down-fields-tp5051531p5051531.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org