Hi all,
I found the solution. In case anyone needs is it you can read through it.
in
jsp:
--------
<td>
<spring:bind path="klantId">
<form:select path="klantId" items="${opdrachtGeversList}" itemValue="opdrachtGeverId" itemLabel="opdrachtGeverNaam"/>
</spring:bind>
</td>
i don't think the spring bind is needed.
Java classes
---------------
public class OpdrachtGevers {
private
String opdrachtGeverNaam;
private Integer opdrachtGeverId;
private String profile;
public String getOpdrachtGeverNaam() {
return opdrachtGeverNaam;
}
public void setOpdrachtGeverNaam(String opdrachtGeverNaam) {
this.opdrachtGeverNaam = opdrachtGeverNaam;
}
public Integer getOpdrachtGeverId() {
return opdrachtGeverId;
}
public void setOpdrachtGeverId(Integer opdrachtGeverId) {
this.opdrachtGeverId = opdrachtGeverId;
}
public String getProfile() {
return profile;
}
public void setProfile(String profile) {
this.profile = profile;
}
}
Java DAO class
------------------
public List<OpdrachtGevers> retrieve() {
try {
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
String sqlQuery = " from OpdrachtGevers as opdrachtGevers where lower(opdrachtGevers.profile) not like "+"'general'"+" ORDER BY opdrachtGevers.opdrachtGeverNaam";
System.out.println("query executing");
List<OpdrachtGevers> opdrachtGeversList = (List<OpdrachtGevers>) session.createQuery(sqlQuery).list();
System.out.println("query executed");
session.getTransaction().commit();
return opdrachtGeversList;
} catch (RuntimeException re) {
throw re;
}
}