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

Public Member Functions

void setProvider (Contact provider)
 
void setPartialName (String name)
 
void setRole (String role)
 
- Public Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
 CollectionListbox ()
 
 CollectionListbox (Collection< V > collection)
 
void updateCollection ()
 
void updateCollection (Collection< V > collection)
 
boolean isAllowNull ()
 
void setAllowNull (boolean allowNull)
 
Collection< V > getCollection ()
 
void setCollection (Collection< V > collection)
 
boolean isNullAtBottom ()
 
void setNullAtBottom (boolean nullAtBottom)
 
String getNullLabel ()
 
void setNullLabel (String nullLabel)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericListbox< V >
 GenericListbox ()
 
void setDisabled (boolean value)
 
void afterCompose ()
 
void clearItems ()
 
void setObjectValue (V value)
 
void setObjectValues (Collection< V > collection)
 
getObjectValue ()
 
Collection< V > getObjectValues ()
 
Collection< V > getDeselectedObjectValues ()
 
boolean isSelectFirst ()
 
void setSelectFirst (boolean selectFirst)
 
Set getDeselectedItems ()
 
void sort ()
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 

Protected Member Functions

String convertToString (Contact v)
 
- Protected Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
void populateList ()
 
boolean equals (V value, V obj)
 
abstract String convertToString (V v)
 
void beforeAppend (Listitem li)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.zkoss.input.CollectionListbox< V >
static final String ITEM_SEPARATOR = "|||"
 
- Protected Attributes inherited from org.turro.zkoss.input.GenericListbox< V >
boolean populated = false
 

Detailed Description

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

Definition at line 33 of file ContactListbox.java.

Member Function Documentation

◆ convertToString()

String org.turro.contacts.util.ContactListbox.convertToString ( Contact  v)
protected

Definition at line 65 of file ContactListbox.java.

65  {
66  return v.getName();
67  }
Here is the call graph for this function:

◆ setPartialName()

void org.turro.contacts.util.ContactListbox.setPartialName ( String  name)

Definition at line 43 of file ContactListbox.java.

43  {
44  if(!Strings.isBlank(name) && name.trim().length() > 2) {
45  if(dao == null) {
46  dao = new ContactsPU();
47  }
48  updateCollection(dao.getResultList(
49  "select c from Contact as c where c.name like ? order by c.name",
50  new String[] { "%" + name.trim() + "%" }));
51  }
52  }
Here is the call graph for this function:

◆ setProvider()

void org.turro.contacts.util.ContactListbox.setProvider ( Contact  provider)

Definition at line 37 of file ContactListbox.java.

37  {
38  if(provider != null) {
39  updateCollection(new WorkersAdapter(provider));
40  }
41  }
Here is the call graph for this function:

◆ setRole()

void org.turro.contacts.util.ContactListbox.setRole ( String  role)

Definition at line 54 of file ContactListbox.java.

54  {
55  if(dao == null) {
56  dao = new ContactsPU();
57  }
58  updateCollection(dao.getResultList(
59  "select contact from Contact as contact where " +
60  getInRole(role) +
61  " order by contact.name"));
62  }
Here is the call graph for this function:

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