@Override protected void onNewSubmit(AjaxRequestTarget target, Form<?> f) { Fieldlanguagesvalues flv = new Fieldlanguagesvalues(); flv.setLanguage_id(panel.language.getLanguage_id()); this.setModelObject(flv); target.add(this); target.appendJavaScript("labelsInit();"); }
public List<Fieldvalues> get(Long language_id, int start, int count) { TypedQuery<Fieldvalues> q = em.createNamedQuery("getFieldByLanguage", Fieldvalues.class); // q.setParameter("lang", language_id); //FIXME commented for now q.setFirstResult(start); q.setMaxResults(count); List<Fieldvalues> result = q.getResultList(); for (Fieldvalues fv : result) { // FIXME ineffective !!!!!!!!!!!!!!!!!!!! Fieldlanguagesvalues flv = flvDaoImpl.get(fv.getFieldvalues_id(), language_id); if (flv == null) { flv = new Fieldlanguagesvalues(); flv.setLanguage_id(language_id); flv.setFieldvalues(fv); } fv.setFieldlanguagesvalue(flv); } return result; }