22232425262728293031
private Subject item; private DAOSubject daoSubject; @PostConstruct public void init() { item = new Subject(); daoSubject = DAOSubject.getInstance(); list = daoSubject.find().asList(); }
29303132333435
list = daoSubject.find().asList(); } public void newItem (){ item = new Subject(); }
39404142434445
} public void add() { daoSubject.save(item); list = daoSubject.find().asList(); item = new Subject(); // Reset placeholder. }