BrightSide Workbench Full Report + Source Code
org.turro.financials.account.AccountCombobox Class Reference
Inheritance diagram for org.turro.financials.account.AccountCombobox:
Collaboration diagram for org.turro.financials.account.AccountCombobox:

Public Member Functions

boolean isAllowNewAccount ()
 
void setAllowNewAccount (boolean allowNewAccount)
 
boolean isAllowWildcards ()
 
void setAllowWildcards (boolean allowWildcards)
 
String getAccountString ()
 
void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (Account value)
 
Account getObjectValue ()
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericCombobox< V >
 GenericCombobox ()
 
void setObjectValue (V value)
 
boolean isAllowNotInModelValues ()
 
void setAllowNotInModelValues (boolean allowNotInModelValues)
 
void refreshModel ()
 
abstract String getTextFromObject (V value)
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 
void render (Comboitem item, Object data, int index) throws Exception
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file AccountCombobox.java.

Member Function Documentation

◆ getAccountString()

String org.turro.financials.account.AccountCombobox.getAccountString ( )

Definition at line 52 of file AccountCombobox.java.

52  {
53  Account acc = getObjectValue();
54  if(acc != null) {
55  return acc.getId();
56  } else if(allowWildcards) {
57  return getText();
58  }
59  return null;
60  }
Here is the call graph for this function:

◆ getObjectValue()

Account org.turro.financials.account.AccountCombobox.getObjectValue ( )

Reimplemented from org.turro.zkoss.input.GenericCombobox< V >.

Definition at line 79 of file AccountCombobox.java.

79  {
80  Account acc = super.getObjectValue();
81  String text = getText();
82  if(allowNewAccount && acc == null && AccountFormat.isAccount(text)) {
83 // Collection c = Listeners.cancelListener(this, Events.ON_BLUR);
84  acc = new Account();
85  acc.setId(AccountFormat.expand(text));
86  acc.proposeDescription();
87 // acc.setDescription((String) InputDialog.getInput(
88 // getPage(), I_.get("Account"), "Description", acc.getDescription(), null, 0));
89 // Listeners.activateListeners(this, Events.ON_BLUR, c);
90  }
91  return acc;
92  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTextFromObject()

String org.turro.financials.account.AccountCombobox.getTextFromObject ( Account  value)

Definition at line 74 of file AccountCombobox.java.

74  {
75  return value.getId() + " - " + value.getDescription();
76  }
Here is the call graph for this function:

◆ isAllowNewAccount()

boolean org.turro.financials.account.AccountCombobox.isAllowNewAccount ( )

Definition at line 36 of file AccountCombobox.java.

36  {
37  return allowNewAccount;
38  }

◆ isAllowWildcards()

boolean org.turro.financials.account.AccountCombobox.isAllowWildcards ( )

Definition at line 44 of file AccountCombobox.java.

44  {
45  return allowWildcards;
46  }

◆ populateList()

void org.turro.financials.account.AccountCombobox.populateList ( String  value,
LinkedList  list,
int  nRows 
)

Reimplemented from org.turro.zkoss.input.GenericCombobox< V >.

Definition at line 63 of file AccountCombobox.java.

63  {
64  Dao dao = new FinancialsPU();
65  WhereClause wc = new WhereClause();
66  wc.addClause("select account from Account as account");
67  wc.addClause("where 1=1");
68  wc.addLikeFields(new String[] { "account.id", "account.description" }, value);
69  wc.addClause("order by account.description");
70  list.addAll(dao.getResultList(wc, nRows));
71  }
Here is the call graph for this function:

◆ setAllowNewAccount()

void org.turro.financials.account.AccountCombobox.setAllowNewAccount ( boolean  allowNewAccount)

Definition at line 40 of file AccountCombobox.java.

40  {
41  this.allowNewAccount = allowNewAccount;
42  }
Here is the caller graph for this function:

◆ setAllowWildcards()

void org.turro.financials.account.AccountCombobox.setAllowWildcards ( boolean  allowWildcards)

Definition at line 48 of file AccountCombobox.java.

48  {
49  this.allowWildcards = allowWildcards;
50  }

The documentation for this class was generated from the following file: