Good day all. I am coming to a problem where I implement xPayService.getJobAutocomplete("searchValue"); and my data has been stopped showing in my frontend. can anyone check what is going on to help me fix it. thanks
Here is my java code:
// this is in different class
public void loadSearchList() throws SQLException, NamingException, URISyntaxException, IOException, ParseException {
List<JobSearchItem> jobSearchList = xPayService.getJobAutocomplete("searchValue");
this.setJobSearchItems(jobSearchList);
}
// this is into another class too.
public List<JobSearchItem> getJobAutocomplete(String searchValue) {
String sValue = "%" + searchValue.toUpperCase() + "%";
return dataUtilityService.getJdbcTemplate().query(SQL_GET_AUTOCOMPLETE,
new Object[]{sValue, sValue}, jobSearchItemMapper);
}
Please note that question is updated later so this is partial answer now
getJobAutocomplete expects a parameter and you are not passing it that is the reason you are getting an error.
Replace your string search value with your_serach_string in the line below and it should work
List<JobSearchItem> jobSearchList =xPayService.getJobAutocomplete("search_string");
Update
In below code you should pass your query string. for ex if you want to search for an apple then you should pass apple in the code below.
String search = "apple"
List<JobSearchItem> jobSearchList = xPayService.getJobAutocomplete(search);
this.setJobSearchItems(jobSearchList);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With