19 package org.turro.dossier.zul.dossier;
21 import java.util.logging.Level;
22 import java.util.logging.Logger;
23 import org.turro.dossier.entity.Category;
24 import org.turro.dossier.entity.WorthDefinition;
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;
47 this.category = category;
52 this.category = category;
53 if(category !=
null) {
65 if(category !=
null) {
87 return super.formatCell(editableCell, value);
98 return super.createEditor(editableCell);
101 private void addColumns() {
103 addColumn(
"#",
"long",
"id",
null, 0,
false,
true).setHflex(
"1");
104 addColumn(
I_.
get(
"Grouping"), String.class,
"grouping",
null, 0,
false,
false).setHflex(
"2");
105 addColumn(
I_.
get(
"Title"), String.class,
"title",
null, 0,
false,
false).setHflex(
"2");
106 addColumn(
I_.
get(
"Description"), String.class,
"description",
null, 5,
false,
false).setHflex(
"3");
107 addColumn(
I_.
get(
"Values"), String.class,
"possibleValues",
null, 0,
false,
false).setHflex(
"2");
108 addColumn(
I_.
get(
"Colors"), String.class,
"colors",
null, 0,
false,
false).setHflex(
"2");
109 }
catch (ClassNotFoundException ex) {
110 Logger.getLogger(
WorthDefinitionGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
Set< WorthDefinition > getWorths()
void setCategory(Category category)
boolean isValid(WorthDefinition v)
HtmlBasedComponent createEditor(EditableCell editableCell)
WorthDefinitionGrid(Category category)
void initiateRow(Row row, WorthDefinition value)
String formatCell(EditableCell editableCell, Object value)
void setCategory(Category category)
boolean deleteRow(Row row)
static String get(String msg)
static EntityCollections entities(Collection values)
void updateCollection(Collection< V > collection)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
Object getCellValue(EditableCell editableCell)