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

Public Member Functions

void afterCompose ()
 

Detailed Description

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

Definition at line 40 of file HumanResourceSelector.java.

Member Function Documentation

◆ afterCompose()

void org.turro.erp.time.HumanResourceSelector.afterCompose ( )

Definition at line 43 of file HumanResourceSelector.java.

43  {
44  Rows rows = getRows();
45  if(rows != null) {
46  rows.getChildren().clear();
47  } else {
48  rows = new Rows();
49  appendChild(rows);
50  }
51 
52  Dao dao = new ErpPU();
53  List<HumanResource> list = dao.getResultList(
54  "select hr from HumanResource as hr where hr.active = true order by hr.name");
55 
56  for(HumanResource hr : list) {
57  final Row row = new Row();
58  row.setValue(hr);
59  rows.appendChild(row);
60 
61  row.appendChild(new Label(hr.getName()));
62 
63  Button select = new Button(Application.getString("lSelect"));
64  select.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
65  @Override
66  public void onEvent(Event event) throws Exception {
67  Events.postEvent(new Event(Events.ON_CHANGE, HumanResourceSelector.this, row.getValue()));
68  }
69  });
70  row.appendChild(select);
71  }
72  }
Here is the call graph for this function:

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