BrightSide Workbench Full Report + Source Code
org.turro.erp.humanres.HumanResourceCombobox Class Reference
Inheritance diagram for org.turro.erp.humanres.HumanResourceCombobox:
Collaboration diagram for org.turro.erp.humanres.HumanResourceCombobox:

Public Member Functions

boolean isOnlyActive ()
 
void setOnlyActive (boolean onlyActive)
 
boolean isSelectCurrent ()
 
void setSelectCurrent (boolean selectCurrent)
 
void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (HumanResource value)
 
void afterCompose ()
 
- 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)
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 
void render (Comboitem item, Object data, int index) throws Exception
 

Detailed Description

Member Function Documentation

◆ afterCompose()

void org.turro.erp.humanres.HumanResourceCombobox.afterCompose ( )

Definition at line 90 of file bserp-www/src/main/java/org/turro/erp/humanres/HumanResourceCombobox.java.

90  {
91  if(selectCurrent) {
92  setObjectValue(HumanResources.getCurrent());
93  Events.postEvent(new Event(Events.ON_CHANGE, this));
94  }
95  }
Here is the call graph for this function:

◆ getTextFromObject()

String org.turro.erp.humanres.HumanResourceCombobox.getTextFromObject ( HumanResource  value)

Definition at line 85 of file bserp-www/src/main/java/org/turro/erp/humanres/HumanResourceCombobox.java.

85  {
86  return value.getName();
87  }
Here is the call graph for this function:

◆ isOnlyActive()

boolean org.turro.erp.humanres.HumanResourceCombobox.isOnlyActive ( )

Definition at line 43 of file bserp-www/src/main/java/org/turro/erp/humanres/HumanResourceCombobox.java.

43  {
44  return onlyActive;
45  }

◆ isSelectCurrent()

boolean org.turro.erp.humanres.HumanResourceCombobox.isSelectCurrent ( )

Definition at line 51 of file bserp-www/src/main/java/org/turro/erp/humanres/HumanResourceCombobox.java.

51  {
52  return selectCurrent;
53  }

◆ populateList()

void org.turro.erp.humanres.HumanResourceCombobox.populateList ( String  value,
LinkedList  list,
int  nRows 
)

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

Definition at line 60 of file bserp-www/src/main/java/org/turro/erp/humanres/HumanResourceCombobox.java.

60  {
61  EntityManager em = new ErpPU().getEntityManager();
62  try {
63  WhereClause wc = SQLHelper.getWhereClause(new String[]{
64  "res.name"
65  }, value);
66  Query q = em.createQuery(
67  "select res from HumanResource res " +
68  "where active = :active " +
69  wc.getClause() +
70  " order by res.name"
71  );
72  wc.addNamedValue("active", onlyActive);
73  q.setMaxResults(nRows);
74  wc.setNamedParameters(q);
75  List<HumanResource> l = q.getResultList();
76  for(Object o : l) {
77  list.add(((HumanResource) o).getName());
78  }
79  } finally {
80  em.close();
81  }
82  }
Here is the call graph for this function:

◆ setOnlyActive()

void org.turro.erp.humanres.HumanResourceCombobox.setOnlyActive ( boolean  onlyActive)

Definition at line 47 of file bserp-www/src/main/java/org/turro/erp/humanres/HumanResourceCombobox.java.

47  {
48  this.onlyActive = onlyActive;
49  }

◆ setSelectCurrent()

void org.turro.erp.humanres.HumanResourceCombobox.setSelectCurrent ( boolean  selectCurrent)

Definition at line 55 of file bserp-www/src/main/java/org/turro/erp/humanres/HumanResourceCombobox.java.

55  {
56  this.selectCurrent = selectCurrent;
57  }

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