BrightSide Workbench Full Report + Source Code
org.turro.contacts.util.ContactIdCombobox Class Reference
Inheritance diagram for org.turro.contacts.util.ContactIdCombobox:
Collaboration diagram for org.turro.contacts.util.ContactIdCombobox:

Public Member Functions

void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (String value)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericCombobox< V >
 GenericCombobox ()
 
getObjectValue ()
 
void setObjectValue (V value)
 
boolean isAllowNotInModelValues ()
 
void setAllowNotInModelValues (boolean allowNotInModelValues)
 
void refreshModel ()
 
abstract String getTextFromObject (V value)
 
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 34 of file ContactIdCombobox.java.

Member Function Documentation

◆ getTextFromObject()

String org.turro.contacts.util.ContactIdCombobox.getTextFromObject ( String  value)

Definition at line 51 of file ContactIdCombobox.java.

51  {
52  Contact c = new ContactsPU().find(Contact.class, value);
53  return c == null ? null : c.getName();
54  }
Here is the call graph for this function:

◆ populateList()

void org.turro.contacts.util.ContactIdCombobox.populateList ( String  value,
LinkedList  list,
int  nRows 
)

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

Definition at line 37 of file ContactIdCombobox.java.

37  {
38  Dao dao = new ContactsPU();
39  WhereClause wc = new WhereClause();
40  wc.addClause("select contact from Contact as contact");
41  wc.addClause("where 1=1");
42  wc.addLikeFields(new String[] { "contact.name" }, value);
43  wc.addClause("order by contact.name");
44  List<Contact> l = dao.getResultList(wc, nRows);
45  for(Object o : l) {
46  list.add(((Contact) o).getName());
47  }
48  }
Here is the call graph for this function:

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