19 package org.turro.financials.assets.filter;
21 import org.turro.elephant.db.WhereClause;
22 import org.turro.financials.assets.InvestmentListbox;
23 import org.turro.financials.contract.ContractCombobox;
24 import org.turro.financials.linetype.LineTypeListbox;
25 import org.turro.financials.view.ViewListbox;
26 import org.turro.zkoss.filter.FilterField;
27 import org.turro.zkoss.filter.FilterFieldOperator;
28 import org.turro.zkoss.filter.FilterGrid;
29 import org.zkoss.zk.ui.HtmlBasedComponent;
41 public void addConstraint(WhereClause wc) {
42 doAddConstraint(wc,
"fa.id");
48 doAddConstraint(wc,
"fa.name");
51 addField(
new FilterField(
"Unsubscribed",
true) {
53 public void addConstraint(WhereClause wc) {
54 doAddConstraint(wc,
"fa.unsubscribed");
57 addField(
new FilterField(
"Investment") {
59 protected HtmlBasedComponent createEditor() {
60 InvestmentListbox il =
new InvestmentListbox();
62 il.setAllowNull(
true);
66 public void addConstraint(WhereClause wc) {
67 doAddConstraint(wc,
"fa.investmentPreference");
70 addField(
new FilterField(
"Depreciation") {
72 protected HtmlBasedComponent createEditor() {
73 LineTypeListbox ltl =
new LineTypeListbox();
74 ltl.setMold(
"select");
75 ltl.setAllowNull(
true);
76 ltl.setRegexp(
".*\\(A\\)");
80 public void addConstraint(WhereClause wc) {
81 doAddConstraint(wc,
"fa.depreciationLineType");
86 protected HtmlBasedComponent createEditor() {
87 ContractCombobox cb =
new ContractCombobox();
88 cb.setOnlyStores(
true);
92 public void addConstraint(WhereClause wc) {
93 doAddConstraint(wc,
"fa.store");
98 protected HtmlBasedComponent createEditor() {
99 ViewListbox vl =
new ViewListbox();
100 vl.setMold(
"select");
101 vl.setAllowNull(
true);
105 public void addConstraint(WhereClause wc) {
106 doAddConstraint(wc,
"ifnull(fa.view, 0)");
FilterField addField(FilterField filterField)
boolean loadPreferences(String preference)
FilterField addCurrentField(String label)