18 package org.turro.dossier.zul.dossier;
20 import java.util.Date;
21 import java.util.logging.Level;
22 import java.util.logging.Logger;
23 import org.turro.dossier.entity.Dossier;
24 import org.turro.dossier.entity.DossierVersion;
25 import org.turro.elephant.context.ElephantContext;
26 import org.turro.i18n.I_;
27 import org.turro.jpa.entity.EntityCollections;
28 import org.turro.zkoss.grid.CollectionGrid;
29 import org.turro.zkoss.grid.EditableCell;
30 import org.zkoss.zk.ui.HtmlBasedComponent;
31 import org.zkoss.zul.Row;
46 this.dossier = dossier;
51 this.dossier = dossier;
81 return super.createEditor(editableCell);
84 private void addColumns() {
86 addColumn(
I_.
get(
"Version"), String.class,
"versionId",
null, 0,
false,
false).setHflex(
"2");
87 addColumn(
I_.
get(
"Release date"), Date.class,
"releaseDate",
null, 0,
true,
false).setHflex(
"2");
88 addColumn(
I_.
get(
"Active"),
"boolean",
"active",
null, 0,
true,
false).setHflex(
"1");
89 }
catch (ClassNotFoundException ex) {
90 Logger.getLogger(
DossierVersionGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
void setDossier(Dossier dossier)
Set< DossierVersion > getVersions()
void setDossier(Dossier dossier)
boolean isValid(DossierVersion v)
void initiateRow(Row row, DossierVersion value)
HtmlBasedComponent createEditor(EditableCell editableCell)
boolean deleteRow(Row row)
DossierVersionGrid(Dossier dossier)
static String get(String msg)
static EntityCollections entities(Collection values)
void setCollection(Collection< V > collection)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)