1 public List getEmpNamesViaViewLink() { 2 //Getting reference to empVO row using the view link accessor getEmpVO() 3 RowIterator empRowIterator = this.getEmpVO(); 4 //Creating an empty List to store all emp names 5 List empNames = new ArrayList(); 6 //iterating through all employee rows 7 while(empRowIterator.hasNext()){ 8 //getting emp row one by one from the iterator 9 Row empRow = empRowIterator.next(); 10 //adding emp name to the empNames list 11 empNames.add(empRow.getAttribute("Ename")); 12 } 13 //returning all empNames corresponding to the current dept 14 return empNames; 15 }