Java Studio Creator 2 Update 1 - Problems with Calendar component
Hello,
I just made a very simple webapplication, consiting of 2 webpages. Webpage 1 has a button that sends the user to webpage 2. That works fine. When I add a calendar from the components palette, and select a date thats in 2010, I keep getting redirected to page 1 when I press the button that should send me to page 2. I don't even try to access the selected date from the calendar. When I select a date in 2009, it all works fine. I don't see any exception, not on screen, not in the server log. I'm using the Sun Application Server that comes with Studio Creator.
Kind regards,
Sven
[616 byte] By [
sborkert] at [2007-11-26 11:52:26]

# 1
Generally, when a page does not forward/redirect, it means there is some conversion/validation/runtime error.Do you have a message group component on the page? If not, add one and see if the app displays any messages there.
# 2
Yeah, the calendar component has a mindate and maxdate property which if you exceed it throws out with a validation error. Also it creates an object for every day within the range so don't try to get around this limitation by setting a huge range -- you'll run into heap problems.
Calendar component works OK within its limitations. Ultimately there are some issues which go back to it's initial design and are not now easily solved without a complete rewrite. If you are entering dates that far into the future you would probably be better off with a textField.
Jetson's is spot on with her message group advice. Bet that will show up a validation error.
# 3
Oh, thanks, the message box shows up an error that I should select a date before 02.12.2006.
I'm very new to Studio Creator, JSF and Sun Application Server, I've been working with Tomcat, Struts and JSP only before. Could you tell me any documentation that I could read about logging from applications that I build with Studio Creator. I found out that the log() command from withing the page beans writes a line into the server log, but I see no way to add a log level, or create a separate logfile for my application. I could use log4j, but that would be ignoring existing mechanisms? I did not notice a section about logging within the tutorials on the Sun website.
Kind regards,
Sven
# 4
>Also it creates an object
> for every day within the range so don't try to get
> around this limitation by setting a huge range --
> you'll run into heap problems.
Yossarian,
I asked the engineers whether this was true and they wondered where you got that info and if you could clarify.
# 6
Ok, I now know what my foot tastes like. Have personally verified that the calendar component in JSC 2 update 1 accepts dates (at least) 1970 - 4100. With this range you can see that there some work going on in the background but performance is adequate (a second or two delay). Considering that this is a ridiculous range the Calendar component performs well.
I dug up my old copy of JSC EA 2 and that calendar component seems to have a 9 year range with no settable minDate maxDate.
I appear to have deleted my copy of JSC EA [1] but I guess this must be where I had a poor experience of the component. I'm fairly sure this had a minDate / maxDate property and if they were set too far apart it caused heap space problems. I guess I made a mental note not to try this again and never have since. Anyway, it's irrelevant because the Calendar Component works right now and that's what counts. My apologies to all concerned.