19 package org.turro.erp.purchase;
21 import java.util.logging.Level;
22 import java.util.logging.Logger;
23 import org.turro.elephant.context.Application;
24 import org.turro.erp.entity.Task;
25 import org.turro.erp.entity.WorkOrder;
26 import org.turro.erp.reference.OrderReferenceGrid;
27 import org.turro.erp.reference.OrderReferencePositionListbox;
28 import org.turro.erp.task.TaskListbox;
29 import org.turro.financials.product.IProduct;
30 import org.turro.financials.product.ProductExtendedCombobox;
31 import org.turro.zkoss.grid.CollectionGrid;
32 import org.turro.zkoss.grid.EditableCell;
33 import org.turro.zkoss.grid.EditableColumn;
34 import org.zkoss.zk.ui.HtmlBasedComponent;
35 import org.zkoss.zk.ui.event.Event;
36 import org.zkoss.zk.ui.event.EventListener;
37 import org.zkoss.zk.ui.event.Events;
38 import org.zkoss.zk.ui.ext.AfterCompose;
39 import org.zkoss.zul.Row;
47 private long lastWorkOrderId;
48 private int lastOrderRef;
49 private Task lastTask;
50 private String lastConcept;
51 private boolean receipt;
62 this.receipt = receipt;
95 orplb.setMold(
"select");
101 orplb.addEventListener(Events.ON_SELECT,
new EventListener() {
103 public void onEvent(Event event)
throws Exception {
107 Events.postEvent(
new Event(Events.ON_CHANGING,
ProductsGrid.this, editableCell));
116 tlb.setMold(
"select");
130 return super.createEditor(editableCell);
138 lastTask = productsItem.
getTask();
140 if(value instanceof
Task) {
143 }
else if(value instanceof
IProduct) {
147 return super.formatCell(editableCell, value);
158 return super.isCellValid(editableCell, value);
161 private void addColumns() {
170 }
catch (ClassNotFoundException ex) {
171 Logger.getLogger(OrderReferenceGrid.class.getName()).log(Level.SEVERE,
null, ex);
static String getString(String key)
static WorkOrder getByWorkOrderId(long value)
String formatCell(EditableCell editableCell, Object value)
boolean isValid(ProductsItem v)
void setReceipt(boolean receipt)
void initiateRow(Row row, ProductsItem value)
boolean deleteRow(Row row)
HtmlBasedComponent createEditor(final EditableCell editableCell)
boolean isCellValid(EditableCell editableCell, Object value)
void setConcept(String concept)
OrderReference getOrderReference()
void setOrderRef(int orderRef)
void setWorkOrderId(long workOrderId)
void setWorkOrder(WorkOrder workOrder)
void setOrderReference(OrderReference orderReference)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
Object getCellValue(EditableCell editableCell)
String getProductString()