Search This Blog

Friday, July 17, 2009

Calender Functionality

Hi All,

Here the calendar functionality in Iceface as follows

In JSF page :

renderAsPopup="true" renderMonthAsDropdown="true" renderYearAsDropdown="true" rendered="true"
style="height: 22px; left: 936px; top: 216px; position: absolute; width: 118px" value="#{SiteTwo.selectInputDate1Bean.date1}" valueChangeListener="#{site.valueChangeListenerDate}"/>


“SiteTwo.selectInputDate1Bean.date1” is automatically generated by class names “SelectInputDateBean” when we create calendar in java class with bellow coding for single Calendar Instance.

private SelectInputDateBean selectInputDate1Bean = new SelectInputDateBean();

public SelectInputDateBean getSelectInputDate1Bean() {
return selectInputDate1Bean;
}

public void setSelectInputDate1Bean(SelectInputDateBean sidb) {
this.selectInputDate1Bean = sidb;
}

In Managed Bean:

In managed bean we have to handle event on which component has generated event and take the value and assigned to Managed bean property as bellow



public void valueChangeListenerDate(ValueChangeEvent event){
if(event.getComponent().getId().equalsIgnoreCase("selectInputDateOfInstallation")){
this.alternateEnergyInstalledDate = (Date)event.getNewValue();
System.out.println("--------------DATE OF INSTALLATION--------"+alternateEnergyInstalledDate);

}else if(event.getComponent().getId().equalsIgnoreCase("SiteTwodateLeaseRental")){


}else if(event.getComponent().getId().equalsIgnoreCase("SiteTwolandLordClosureDate")){
this.landLordInitialDiscussionStartDate = (Date)event.getNewValue();

}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.