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.DescriptorDefinition;
25 import org.turro.dossier.entity.DescriptorType;
26 import org.turro.dossier.project.DescriptorTypeListbox;
27 import org.turro.elephant.context.ElephantContext;
28 import org.turro.i18n.I_;
29 import org.turro.jpa.entity.EntityCollections;
30 import org.turro.zkoss.grid.CollectionGrid;
31 import org.turro.zkoss.grid.EditableCell;
32 import org.zkoss.zk.ui.HtmlBasedComponent;
33 import org.zkoss.zul.Row;
49 this.category = category;
54 this.category = category;
55 if(category !=
null) {
67 if(category !=
null) {
96 return super.formatCell(editableCell, value);
109 ppl.setAllowNull(
true);
110 ppl.setMold(
"select");
114 return super.createEditor(editableCell);
117 private void addColumns() {
119 addColumn(
I_.
get(
"Grouping"), String.class,
"grouping",
null, 0,
false,
false).setHflex(
"2");
120 addColumn(
I_.
get(
"Ordering"),
"int",
"orderNumber",
null, 0,
false,
false).setHflex(
"1");
121 addColumn(
I_.
get(
"Title"), String.class,
"title",
null, 0,
false,
false).setHflex(
"2");
122 addColumn(
I_.
get(
"Minimum"),
"int",
"minChars",
null, 0,
false,
false).setHflex(
"1");
123 addColumn(
I_.
get(
"Required"),
"boolean",
"required",
null, 0,
true,
false).setHflex(
"1");
125 }
catch (ClassNotFoundException ex) {
126 Logger.getLogger(DossierVersionGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
Set< DescriptorDefinition > getDescriptors()
void setCategory(Category category)
DescriptorValue getValue()
void initiateRow(Row row, DescriptorDefinition value)
String formatCell(EditableCell editableCell, Object value)
DescriptorDefinitionGrid(Category category)
boolean deleteRow(Row row)
void setCategory(Category category)
HtmlBasedComponent createEditor(EditableCell editableCell)
boolean isValid(DescriptorDefinition v)
DescriptorDefinitionGrid()
static String byKey(String key)
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)