18 package org.turro.financials.account;
20 import org.turro.string.Strings;
21 import org.turro.financials.book.BookListbox;
22 import org.turro.financials.db.FinancialsPU;
23 import org.turro.financials.entity.BookDefinition;
24 import org.turro.financials.entity.MajorAccount;
25 import org.turro.financials.entity.MajorAccountType;
26 import org.turro.i18n.I_;
27 import org.turro.jpa.grid.JpaGrid;
28 import org.turro.zkoss.grid.EditableCell;
29 import org.turro.zkoss.input.EnumListbox;
30 import org.zkoss.zk.ui.HtmlBasedComponent;
31 import org.zkoss.zul.Row;
41 "select major from MajorAccount as major " +
42 "order by major.account",
true);
69 EnumListbox<MajorAccountType> mat =
new EnumListbox<MajorAccountType>(
MajorAccountType.values());
70 mat.setMold(
"select");
72 mat.setAllowNull(
true);
76 blb.setMold(
"select");
81 return super.createEditor(editableCell);
88 }
else if(editableCell.
getCellIndex() == 3 && value !=
null) {
91 return super.formatCell(editableCell, value);
94 private void addColumns() {
97 "account",
null, 0,
false,
false).setWidth(
"100px");
99 "description",
null, 0,
false,
false);
101 "type",
null, 0,
false,
false).setWidth(
"160px");
102 addColumn(
I_.
get(
"Book"), org.turro.financials.entity.BookDefinition.class,
103 "bookDefinition",
null, 0,
false,
false).setWidth(
"300px");
boolean isValid(MajorAccount v)
void initiateRow(Row row, MajorAccount value)
String formatCell(EditableCell editableCell, Object value)
HtmlBasedComponent createEditor(EditableCell editableCell)
static String byKey(String key)
static String get(String msg)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
Object getCellValue(EditableCell editableCell)