| View previous topic :: View next topic |
| Author |
Message |
rlhommedieu
Joined: 24 Oct 2009 Posts: 4
|
Posted: Sat Oct 24, 2009 7:16 am Post subject: Calendar control shows duplicate dates |
|
|
I have a visual web app running in NB 6.7.1 that uses the Woodstock calendar control. When the month is set to November 2009, the control displays November 1 twice. Which then throws off the entire calender with respect to the day of the week for any given date.
I suspect this has something to do with daylight saving time, which reverts to standard time on November 1.
An example of the problem can be seen at http://webdev2.sun.com/example/faces/calendar/calendar.jsp
Set the month to November and observe that November 1 shows up as Sunday and Monday.
Any help would be appreciated.
The jsp for the control is as follows:
<webuijsf:calendar binding="#{AddRequest.startDateCal}" id="startDateCal" selectedDate="#{SessionBean.startDate}"
style="font-family: 'Arial','Helvetica',sans-serif; font-size: 14px; font-style: normal; font-weight: bold; left: 280px; top: 232px; position: absolute" tabIndex="3"
validatorExpression="#{AddRequest.validateStartDate}"/> |
|
| Back to top |
|
 |
g4ab
Joined: 04 Nov 2009 Posts: 2
|
Posted: Wed Nov 04, 2009 3:46 pm Post subject: |
|
|
| Have you resolved this issue? I'm having the same problem. |
|
| Back to top |
|
 |
drewh
Joined: 18 Nov 2009 Posts: 1
|
Posted: Wed Nov 18, 2009 2:34 pm Post subject: |
|
|
| Yea. Having the same problem over here. |
|
| Back to top |
|
 |
rlhommedieu
Joined: 24 Oct 2009 Posts: 4
|
Posted: Wed Nov 18, 2009 3:15 pm Post subject: Re. Calendar Control |
|
|
I find it hard to believe that more users are not effected by this.
I have about given up on finding a solution for the this (Woodstock issue??)
I'm looking into porting my app to IceFaces. |
|
| Back to top |
|
 |
g4ab
Joined: 04 Nov 2009 Posts: 2
|
Posted: Wed Nov 18, 2009 6:19 pm Post subject: Somewhat of a solution. |
|
|
Ok. Since I couldn't find a solution to using woodstock I ended up hacking another calendar in there.
Just a couple notes....the stylesheet was wreaking havoc.
Now, I am NOT an expert in javascript.
But this is what I got to work.
http://www.garrett.nildram.co.uk/calendar/jacs.htm
has a javascript calendar which does NOT use stylesheets.
To that I added a date testing library from http://www.datejs.com/
I used the webuijsf tag to include the scripts. (I put them in a directory called js under my web root)
| Code: |
<webuijsf:script type="text/javascript" url="js/jacs.js"/>
<webuijsf:script type="text/javascript" url="js/date-en-US.js"/>
|
And to include a simple calendar I did.
Couple of important things to note(as I said I'm not a Javascript/JSP expert so I muddle along on that stuff): The elementID must be the full hierarchy.(Note the form1:layoutPanel1:etc:etc)
Otherwise it will fail.
ALSO....you will need to edit the JACS.js because the configuration for the calendar seems fairly hardcoded (It implied you could do it w/o that but I couldn't figure it out and didn't feel like putting in the time to completely dissect his Script.).
the setDateFromString was just a JavaScript function I whipped up to test
the date's validity.
And of course the Value is bound to the bean property.
This is NOT an elegant solution but it works and does what I needed it to do
w/o forcing me to re-write the entire application.
| Code: |
<h:inputText id="addEncounterDoS_HIT"
onblur="return setDateFromString(this,'form1:layoutPanel1:workingTabSet:addServiceTab:layoutPanel5:addEncounterDoS_HIT')"
onchange="return setDateFromString(this,'form1:layoutPanel1:workingTabSet:addServiceTab:layoutPanel5:addEncounterDoS_HIT')"
value="#Working.addEncounterDoS_Str}"/>
<img alt="Click Here" onclick="JACS.show(document.getElementById('form1:layoutPanel1:workingTabSet:addServiceTab:layoutPanel5:addEncounterDoS_HIT'),event);"
src="img/jacs.gif" title="Click Here"/>
|
Hope this helps someone who is in a similar situation.
Enjoy!!
Greg
www.aaronsinvestment.com |
|
| Back to top |
|
 |
jyeary
Joined: 21 Oct 2008 Posts: 100 Location: Simpsonville, SC
|
Posted: Wed Nov 18, 2009 9:25 pm Post subject: Re: Calendar control shows duplicate dates |
|
|
This was reported already.
https://woodstock.dev.java.net/issues/show_bug.cgi?id=1332
On Wed, Nov 18, 2009 at 9:34 AM, drewh <address-removed ([email]address-removed[/email])> wrote:
| Quote: | Yea. _________________ You get more with a kind word and a gun than with a kind word alone. |
|
| Back to top |
|
 |
rlhommedieu
Joined: 24 Oct 2009 Posts: 4
|
Posted: Thu Nov 19, 2009 2:14 am Post subject: Calendar control shows duplicate dates |
|
|
Hey Greg, thanks for the input. I'll keep that info as a backup plan.
I'm struggling along with IceFaces and NetBeans 6.5.1 and making some headway.
I like the ajax and security roles capabilities in IceFaces and it appears that the Woodstock Project may not be supported in the future.
My project is in beta and the user base is building up, so who knows what other Woodstock issues may lie ahead.
Thanks again,
Roger |
|
| Back to top |
|
 |
Andreas Hesse Posted via mailing list.
|
Posted: Thu Nov 19, 2009 8:36 am Post subject: Re: Calendar control shows duplicate dates |
|
|
Another solution is to tweak the woodstock component.
There's an howto in old thread (s
http://markmail.org/message/yafy7ioifn46muag ) that shows howto use jacs
with the woodstock calendar.
Andreas
g4ab schrieb:
| Quote: | Ok. Since I couldn't find a solution to using woodstock I ended up hacking another calendar in there.
Just a couple notes....the stylesheet was wreaking havoc.
Now, I am NOT an expert in javascript.
But this is what I got to work.
[url]
http://www.garrett.nildram.co.uk/calendar/jacs.htm[/url]
has a javascript calendar which does NOT use stylesheets.
To that I added a date testing library from http://www.datejs.com/
I used the webuijsf tag to include the scripts. (I put them in a directory called js under my web root)
<webuijsf:script type="text/javascript" url="js/jacs.js"/>
<webuijsf:script type="text/javascript" url="js/date-en-US.js"/>
And to include a simple calendar I did.
Couple of important things to note(as I said I'm not a Javascript/JSP expert so I muddle along on that stuff): The elementID must be the full hierarchy.(Note the form1:layoutPanel1:etc:etc)
Otherwise it will fail.
ALSO....you will need to edit the JACS.js because the configuration for the calendar seems fairly hardcoded (It implied you could do it w/o that but I couldn't figure it out and didn't feel like putting in the time to completely dissect his Script.).
the setDateFromString was just a JavaScript function I whipped up to test
the date's validity.
And of course the Value is bound to the bean property.
This is NOT an elegant solution but it works and does what I needed it to do
w/o forcing me to re-write the entire application.
<h:inputText id="addEncounterDoS_HIT"
onblur="return setDateFromString(this,'form1:layoutPanel1:workingTabSet:addServiceTab:layoutPanel5:addEncounterDoS_HIT')"
onchange="return setDateFromString(this,'form1:layoutPanel1:workingTabSet:addServiceTab:layoutPanel5:addEncounterDoS_HIT')"
value="#Working.addEncounterDoS_Str}"/>
<img alt="Click Here" onclick="JACS.show(document.getElementById('form1:layoutPanel1:workingTabSet:addServiceTab:layoutPanel5:addEncounterDoS_HIT'),event);"
src="img/jacs.gif" title="Click Here"/>
Hope this helps someone who is in a similar situation.
Enjoy!!
Greg
www.aaronsinvestment.com
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
|