I have a list having field is and is_searchable data has
field_id i_searchable
1234 1
2344 0
4553 1
i am looping over the list to check if data is searchable then return true else false
public boolean validate() {
LOGGER.info("in validate");
boolean isSearchValue = false;
LOGGER.info("is isSearchable" + fieldList.size());
for (Field formFieldValMap : fieldList) {
if (formFieldValMap.getIsSearchableField().equals("0")) {
isSearchValue = false;
} else {
isSearchValue = true;
}
}
return isSearchValue;
}
the above function is returning me true,it should me return me false.If the list has all the data in is_searchable has 1 then only it should return true.