First off, I hage to write this on my mobile. But I'll try to format it properly.
In Netbeans I created a jTable and bound it's values to a JPA result set. This works great. The qery contains a param which i set in the pre-create
box of the "query result" component. So just before netbeans creates the query result i write this:
myQuery.setParameter("year", "1997");
This works fine. Now, I have an event handler which is supposed to change the param and display the new values in the table. So I do this:
myQuery.setParameter("year", "2005");
myResultList.clear();
myResultList.addAll(myQuery.getResultList());
jTable1.updateUI();
This works, but it feels wrong to me. Note: the result set is bound to the table. So I was hoping there was something like this: myQuery.setParameter("year", "2005"); myResultList.refresh();
Is there something like this?