atom feed26 messages in org.apache.jakarta.taglibs-devRe: Contribution
FromSent OnAttachments
Shiraz KangaSep 20, 2000 8:06 pm 
Shawn BayernSep 20, 2000 8:21 pm 
Joseph B. OttingerSep 20, 2000 8:34 pm 
Craig R. McClanahanSep 20, 2000 8:49 pm 
Craig R. McClanahanSep 20, 2000 8:51 pm 
Glenn NielsenSep 21, 2000 8:40 am 
Shiraz KangaSep 21, 2000 10:11 am 
Craig R. McClanahanSep 21, 2000 10:18 am 
Shawn BayernSep 21, 2000 10:53 am 
Hans BergstenSep 21, 2000 11:52 am 
Shawn BayernSep 21, 2000 12:09 pm 
Shiraz KangaSep 21, 2000 1:18 pm 
Shawn BayernSep 21, 2000 1:20 pm 
Hans BergstenSep 21, 2000 2:00 pm 
Wong Kok WaiSep 21, 2000 9:36 pm 
Shiraz KangaSep 22, 2000 1:35 am 
Shiraz KangaSep 22, 2000 1:35 am 
Wong Kok WaiSep 22, 2000 4:13 am 
Shiraz KangaSep 22, 2000 9:47 am 
Hans BergstenSep 22, 2000 11:45 am 
Craig R. McClanahanSep 22, 2000 11:48 am 
Hans BergstenSep 22, 2000 12:13 pm 
Justyna HorwatSep 22, 2000 1:18 pm 
Hans BergstenSep 22, 2000 1:44 pm 
Glenn NielsenSep 22, 2000 1:49 pm 
Eduardo Pelegri--LlopartSep 24, 2000 1:27 pm 
Subject:Re: Contribution
From:Shiraz Kanga (ska@bigfoot.com)
Date:Sep 22, 2000 1:35:53 am
List:org.apache.jakarta.taglibs-dev

Here's one way to get the selected date. The urls generated by the calendar tag
have a parameter called "CalendarTagDate" which you can simply grab from the request.
BTW The name of this parameter can be changed by using the dateParam atribute of the tag. Eg: <examples:cal dateParam="MyDate">

This date is in the format YYYYMMDD. The code below can convert this format into
a java Calendar object.

private Calendar parseDate (String s) { int currYear = Integer.parseInt (s.substring (0, 4)); int currMonth = Integer.parseInt (s.substring (4, 6)); int currDate = Integer.parseInt (s.substring (6, 8)); return new GregorianCalendar (currYear, currMonth, currDate); }

Hope this helps. I do not understand the second question.

shiraz

Wong Kok Wai wrote:

Hi,

Thanks for sharing your code. A few quick questions: a) how do I get the current selected date? b) is there some sort of "notification" when a change happens?

thanks

Shiraz Kanga wrote:

Okay - Take a look at http://www.devport.com/taglib/ and you should see the code (CalendarTag.java) and some other stuff.

The tag usage is very simple. The demo.jsp file simply uses <examples:cal> with no parameters, while demo2.jsp sets some of the parameters like using images for the arrows instead of the default << and >> and so on.

Thanks

shiraz

Shawn Bayern wrote:

On Wed, 20 Sep 2000, Shiraz Kanga wrote:

I'd like to donate this code to the Apache Group. Can anyone tell me how this is done? Should I just post it here as an attachment? I couldnt find out how to do this from the jakarta web site.

I'm not sure there's a standard procedure, but posting the code at a URL that we can access would definitely be convenient.

The demo looks great, by the way. Thanks for your offer to contribute,

Shawn