I am trying to show part of the content of a list that I have but I do not know how to do it. I have a list of facilities with 30 selection options but I want to see only 3, that is, I have this list for example: Fuel station Wheels Seating Boxes Changes Frills Motors Moons Screws ... And I want only changes, motors and moons to appear to me
try {
if (this.getInstalacion()!=null && this.getInstalacion().length>0) {
selectedInst = "[";
for (Integer id : this.getInstalacion()) {
selectedInst += this.getInstallationh().get(id.toString()) + ";";
}
selectedInst = selectedInst.substring(0, selectedInst.length()-1) + "]";
if (this.getZona()!=null && this.getZona().length>0) {
selectedInst += " (...)";
}
}
} catch (Exception e) {
logger.warning("ajaxSelectedInstallations (getting installations): " + e.toString());
}