Rich:Calender go to dateselected event
asimshaikh1 Aug 26, 2013 12:49 AMHi Everyone I have some problem in fetching Data through calender My Question is How I can go to records of selected date using rich calender what I want my code to do is after selecting any date from the calender It will search the Date in Table and showing me the related records. present in the table
<------------------Jsp------------------------------------------>
<rich:calendar value="#{eventMaster.eventDate}"
popup="#{eventMaster.popup}" datePattern="#{eventMaster.pattern}"
showApplyButton="#{eventMaster.showApply}" cellWidth="24px" cellHeight="22px" style="width:200px"
disabled="#{eventMaster.disabled or eventMaster.viewMode}"
ondateselect="eventMaster.searchOutputScreenRecords">
</rich:calendar>
<-----Bean----->
public Date getEventDate() {
return eventDate;
}
public void setEventDate(Date eventDate) {
this.eventDate = eventDate;
}
<-----action ----->
public String searchOutputScreenRecords() {
try {
this.searchVariableAvailable = true;
EventMasterOps opsObj = new EventMasterOps();
if (this.outputSearch != null) {
this.outputList = opsObj.searchRecordsInDatabase(this.outputSearch, ConstantsUtility.searchOutputForm);
if (this.outputList == null) {
this.massage = "No Search Record is found.";
}
}
} catch (Exception e) {
log.info("exception in EventMaster:searchOutputScreenRecords()::" + e.getMessage());
}
return "outputClient";
}
<-----Operation file from where I am calling query---------------->
public List<EventMasterBean> searchRecordsInDatabase(String searchValue, String formType) {
FindDescriptionHelper fdHelp = new FindDescriptionHelper();
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
this.eventmaster = new ArrayList<EventMasterBean>();
SqlSearchQuriesUtil searchqueryUtil = new SqlSearchQuriesUtil();
String query = "";
if (formType.equals(ConstantsUtility.searchInputForm)) {
query = searchqueryUtil.getEventSearchInputQuery(searchValue);
}