ItEr29S06CUAsignacionGrupoRecursosAPlanificacionItEr28S06: [FixBug] Show all workers only when text to search is empty and there are not criterions selected

This commit is contained in:
Diego Pino Garcia 2009-10-06 20:14:58 +02:00 committed by Javier Moran Rua
parent 98c2e260c8
commit a874c84594

View file

@ -125,16 +125,16 @@ public class WorkerSearchController extends GenericForwardComposer {
* @param criterions
*/
private void searchWorkers(String name, List<Criterion> criterions) {
if (name == null || name.length() == 0) {
// No text, and no criterions selected
if (criterions.isEmpty()
&& (name == null || name.isEmpty())) {
refreshListBoxWorkers(workerSearchModel.getAllWorkers());
return;
}
List<Worker> listWorkers = workerSearchModel.findWorkers(name,
getSelectedCriterions());
refreshListBoxWorkers(listWorkers
.toArray(new Worker[listWorkers
.size()]));
final List<Worker> listWorkers = workerSearchModel.findWorkers(name,
criterions);
refreshListBoxWorkers(listWorkers);
}
/**