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

Public Member Functions

void setStartsWith (String startsWith)
 
void afterCompose ()
 

Public Attributes

String startsWith
 

Detailed Description

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

Definition at line 39 of file XMLHumanResourceSelector.java.

Member Function Documentation

◆ afterCompose()

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

Definition at line 53 of file XMLHumanResourceSelector.java.

53  {
54  Rows rows = getRows();
55  if(rows != null) {
56  rows.getChildren().clear();
57  } else {
58  rows = new Rows();
59  appendChild(rows);
60  }
61 
62  XMLHumanResourceSet xhrs = new XMLHumanResourceSet(Application.getApplication().getConstructor());
63  XMLTimeControlUtil xtcu = new XMLTimeControlUtil(Application.getApplication().getConstructor());
64 
65  for(XMLHumanResource hr : xhrs) {
66  if(!Strings.isBlank(startsWith) && !hr.getName().toLowerCase().startsWith(startsWith.toLowerCase())) {
67  continue;
68  }
69  final Row row = new Row();
70  row.setValue(hr);
71  rows.appendChild(row);
72 
73  xtcu.setHumanResource(hr);
74  if(xtcu.getPendingControl().isEmpty()) {
75  row.setSclass("not-in");
76  }
77  row.appendChild(new Label(hr.getName()));
78 
79  Button select = new Button(Application.getString("lSelect"));
80  select.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
81  @Override
82  public void onEvent(Event event) throws Exception {
83  Events.postEvent(new Event(Events.ON_CHANGE, XMLHumanResourceSelector.this, row.getValue()));
84  }
85  });
86  row.appendChild(select);
87  }
88  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStartsWith()

void org.turro.erp.time.XMLHumanResourceSelector.setStartsWith ( String  startsWith)

Definition at line 43 of file XMLHumanResourceSelector.java.

43  {
44  if(CompareUtil.compare(startsWith, this.startsWith) == 0) {
45  this.startsWith = null;
46  } else {
47  this.startsWith = startsWith;
48  }
49  afterCompose();
50  }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ startsWith

String org.turro.erp.time.XMLHumanResourceSelector.startsWith

Definition at line 41 of file XMLHumanResourceSelector.java.


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