-
1. Re: rich:calendar does not show the current date
ilya_shaikovsky Sep 29, 2009 4:54 AM (in response to k_krish_rao)Calendar in popup mode opened on today of value is empty by design. this was designed in order to solve next case: the user opens calendar scrolled 100years forward and closes calendar without selection date. calendar should be opened at today again in this case. So in your case the workaround could be - select some default date in needed year in order to open calendar as you need.
-
2. Re: rich:calendar does not show the current date
k_krish_rao Sep 29, 2009 5:41 AM (in response to k_krish_rao)Thanks for the suggestion
Is there a way for a method that can be invoked in the backing bean class when the user clicks on the calendar component (popup is true).
Before the calendar is displayed I want a method to be invoked -
3. Re: rich:calendar does not show the current date
k_krish_rao Sep 29, 2009 5:50 AM (in response to k_krish_rao)If I set a default date in the selected year, for eg I set Jan 01, 2010
then the issue that i face is when the calendar is popped up I cannot select that date.
I have developed a oragnizer kind of application simialr to the one in the http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar
So if I select a date (Sep 20, 2009) so the value attribute is set to a Date attribute in the backing bean
value="#{Business_BusinessCalendarBean.selectedDate}"
A ui pops up and I select whether its a holiday or a recurring hoiday. On click of OK, this date is stored in a collection.
Now if I don not set the selectedDate attribute to null in the backing bean, I cannot select the date again. I have to select on another date, select cancel on the popped ui and then select Sep 20, 2009 again -
4. Re: rich:calendar does not show the current date
ilya_shaikovsky Sep 29, 2009 6:08 AM (in response to k_krish_rao)first question. unfortunatelly even if you will define support for onshow - request will be fired but the calendar popup will not wait the request completion but will be opened right after request sending. As workaround you could override default behavior by hidding default button for example and adding your own ajax button with the same icon which will send request, call the method you need, reRender the calendar if need, and open calendar with switch method on oncomplete.
and on the second issue yes you can't select already selected date because event just not fired. you could check the code that workarounds it at the page you mentioned. -
5. Re: rich:calendar does not show the current date
k_krish_rao Sep 29, 2009 6:28 AM (in response to k_krish_rao)Hi,
I 'am not too sure what is the work around is in
http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar
Could you please point out how is it done.
I saw that the modal panel pops up when i select a already selected date -
6. Re: rich:calendar does not show the current date
k_krish_rao Sep 29, 2009 6:49 AM (in response to k_krish_rao)Thanks I saw that in the livedemo organizer application they have done the following
<a4j:outputPanel layout="block" id="cell" onclick="#{rich:component('organizer')}.resetSelectedDate()" style="height: 100%;"> <h:panelGrid columns="1"> <h:outputText value="{day}" style="align:center"/> <h:outputText value="{data.shortDescription.escapeHTML()}"/> <h:outputText value="{data.description.escapeHTML()}"/> </h:panelGrid> </a4j:outputPanel>
This is the workaround
Have modified my application to have the same changes and it works now
Thanks a lot -
7. Re: rich:calendar does not show the current date
k_krish_rao Sep 29, 2009 7:44 AM (in response to k_krish_rao)I have a new issue after i put in the workaround specified in
http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar
When a select a date that is already selected the method set to valueChangedListener does not get invoked
valueChangeListener="#{Business_BusinessCalendarBean.valueChanged}"
How do I force this method to be invoked -
8. [SOLVED] Re: rich:calendar does not show the current date
asmweb Sep 29, 2009 9:00 AM (in response to k_krish_rao)The problem was on the logic part.... thank you for the help anyway