Forums de discussion

How to Fetch Records from Table in Rich:calendar

Asim Shaikh, modifié il y a 10 années.

How to Fetch Records from Table in Rich:calendar

New Member Envoyer: 1 Date d'inscription: 30/08/13 Publications récentes
Hello I am new to Richfaces I have one input field and a search button It is working fine but now I want to Search only Dates from search field So I am thinking of calendar to fetch records but how can fecth records from calendar on selected date as input

<------------------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);
}
thumbnail
Juan Gonzalez, modifié il y a 10 années.

RE: How to Fetch Records from Table in Rich:calendar

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Sorry, this is a forum to solve Richfaces issues with Liferay Faces, not Richfaces/JSF - only issues.

Anyway, seems you aren't using "eventMaster.eventDate" in your action to call "searchRecordsInDatabase" method.