Author: amarkhel
Date: 2008-09-09 07:04:31 -0400 (Tue, 09 Sep 2008)
New Revision: 10374
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/modelImpl/CalendarDataModelImpl.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml
Log:
Fix 4154 bug
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/modelImpl/CalendarDataModelImpl.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/modelImpl/CalendarDataModelImpl.java 2008-09-09
10:55:41 UTC (rev 10373)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/modelImpl/CalendarDataModelImpl.java 2008-09-09
11:04:31 UTC (rev 10374)
@@ -26,6 +26,7 @@
import java.util.HashMap;
import java.util.Map;
+import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import org.richfaces.model.CalendarDataModel;
@@ -110,6 +111,12 @@
* @param valueChangeEvent handling
*/
public void valueChanged(ValueChangeEvent event) {
+ try {
+ Thread.currentThread().sleep(500);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
System.out.println(event.getNewValue()+"selected");
setCurrentDate((Date)event.getNewValue());
Calendar calendar = Calendar.getInstance();
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml 2008-09-09
10:55:41 UTC (rev 10373)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml 2008-09-09
11:04:31 UTC (rev 10374)
@@ -15,6 +15,7 @@
<h:form id="form">
<rich:messages/>
+ <a4j:jsFunction name="ajaxSubmit"
oncomplete="#{rich:component('panel')}.show()"
reRender="editContent" />
<rich:calendar value="#{calendarBean.selectedDate}"
popup="false" showApplyButton="false"
cellWidth="100px" cellHeight="100px"
@@ -25,14 +26,14 @@
<h:outputText value="Current Month" styleClass="header"/>
</h:panelGroup>
</f:facet>
- <a4j:outputPanel layout="block" id="cell">
+ <a4j:outputPanel layout="block" id="cell"
onclick="ajaxSubmit()" style="height: 100%;">
<h:panelGrid columns="1">
<h:outputText value="{day}" style="align:center"/>
<h:outputText value="{data.shortDescription}"/>
<h:outputText value="{data.description}"/>
</h:panelGrid>
</a4j:outputPanel>
- <a4j:support event="onchanged"
oncomplete="#{rich:component('panel')}.show()"
reRender="editContent"/>
+ <a4j:support event="onchanged" reRender="editContent" />
</rich:calendar>
</h:form>
<rich:modalPanel id="panel" resizeable="false">