18 package org.turro.financials.contract;
20 import java.util.logging.Level;
21 import java.util.logging.Logger;
22 import org.turro.elephant.context.ElephantContext;
23 import org.turro.financials.document.DocumentDefinitionCombobox;
24 import org.turro.financials.entity.ContractDefinition;
25 import org.turro.financials.entity.DocumentDefinition;
26 import org.turro.financials.entity.DocumentWorkflow;
27 import org.turro.financials.entity.LineType;
28 import org.turro.financials.linetype.LineTypeListbox;
29 import org.turro.i18n.I_;
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.zk.ui.ext.AfterCompose;
34 import org.zkoss.zul.Row;
55 return contractDefinition;
59 this.contractDefinition = documentDefinition;
95 ltl.setMold(
"select");
98 return super.createEditor(editableCell);
110 return ((
LineType) value).getName();
114 return super.formatCell(editableCell, value);
117 private void addColumns() {
119 addColumn(
I_.
get(
"Ancestor"), org.turro.financials.entity.DocumentDefinition.class,
120 "ancestor",
null, 0,
false,
false).setWidth(
"30%");
121 addColumn(
I_.
get(
"Descendant"), org.turro.financials.entity.DocumentDefinition.class,
122 "descendant",
null, 0,
false,
false).setWidth(
"30%");
124 "allowNewDescendants",
null, 0,
false,
false).setWidth(
"10%");
125 addColumn(
I_.
get(
"Line type"), org.turro.financials.entity.LineType.class,
126 "lineType",
null, 0,
false,
false).setWidth(
"30%");
127 }
catch (ClassNotFoundException ex) {
128 Logger.getLogger(
DocumentWorkflowGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
ContractDefinition getContractDefinition()
void initiateRow(Row row, DocumentWorkflow value)
boolean deleteRow(Row row)
String formatCell(EditableCell editableCell, Object value)
HtmlBasedComponent createEditor(EditableCell editableCell)
DocumentWorkflowGrid(ContractDefinition contractDefinition)
boolean isValid(DocumentWorkflow v)
void setContractDefinition(ContractDefinition documentDefinition)
Set< DocumentWorkflow > getDocumentWorkflows()
DocumentDefinition getDescendant()
void setContractDefinition(ContractDefinition contractDefinition)
DocumentDefinition getAncestor()
static String get(String msg)
void setCollection(Collection< V > collection)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
Object getCellValue(EditableCell editableCell)