19 package org.turro.erp.sales;
21 import java.util.Collection;
22 import org.turro.string.Strings;
23 import org.turro.elephant.context.Application;
24 import org.turro.elephant.util.DateFormats;
25 import org.turro.erp.entity.CustomerOrder;
26 import org.turro.erp.menu.ErpMenu;
27 import org.turro.zkoss.grid.PagingGrid;
28 import org.zkoss.zk.ui.event.Event;
29 import org.zkoss.zk.ui.event.EventListener;
30 import org.zkoss.zk.ui.event.Events;
31 import org.zkoss.zk.ui.ext.AfterCompose;
32 import org.zkoss.zul.*;
48 this.filterGrid = filterGrid;
63 private void addRows() {
71 boolean openGroup = list.size() < 40;
74 filter.
checkGroup(
this, customerOrder, openGroup);
76 rows.appendChild(row);
78 row.appendChild(
new Label(customerOrder.getOrderId() +
""));
79 Hbox hbox =
new Hbox();
80 row.appendChild(hbox);
81 A b =
new A(Strings.truncateAndWarn(customerOrder.getDescription(), 50));
82 b.setImage(
"/_zul/images/order.png");
83 b.addEventListener(Events.ON_CLICK,
new EventListener() {
85 public void onEvent(Event event)
throws Exception {
97 private void addColumns() {
101 Column col =
new Column(Application.getString(
"lDate"),
null,
"100px");
102 cols.appendChild(col);
104 col =
new Column(Application.getString(
"lNumber"),
null,
"180px");
105 cols.appendChild(col);
107 col =
new Column(Application.getString(
"lDescription"));
108 cols.appendChild(col);
void checkGroup(Grid grid, CustomerOrder customerOrder, boolean open)
Collection< CustomerOrder > getCustomerOrders(List< IFilterValue > values)
CustomerOrderFilter getFilter()
void setFilterGrid(CustomerOrderFilterGrid filterGrid)
List< IFilterValue > getValues()
Columns getColumns(boolean create)
Rows getRows(boolean create)
void setRowCount(int rows)