Hi,
It left as follow,
public List<String[]> findAllEmailAddress(long employeeId) {
try {
String query = "SELECT EMAIL_TYPE, EMAIL_ADDRESS FROM EMAIL ea " + "INNER JOIN EMPLOYEE emp " +
"ON ea.EMP_ID = emp.EMP_ID " +
"WHERE emp.EMP_ID = " + Long.toString(employeeId);
Query q = em.createNativeQuery(query);
return (List<String[]>)q.getResultList();
} catch (javax.persistence.NoResultException nre) {
return null;
}
}
And the JSF page is,
<c:forEach items="#{employee.allEmailAddress}" var="emailArray">
<c:out value="${emailArray[0]}"/>
<br/>
<c:out value="${emailArray[1]}"/>
</c:forEach>
Regards,
Jose
[Message sent by forum member 'josealvarezdelara']
http://forums.java.net/jive/thread.jspa?messageID=392932