19 package org.turro.erp.time;
21 import java.util.List;
22 import org.turro.elephant.context.Application;
23 import org.turro.erp.db.ErpPU;
24 import org.turro.erp.entity.HumanResource;
25 import org.turro.jpa.Dao;
26 import org.zkoss.zk.ui.event.Event;
27 import org.zkoss.zk.ui.event.EventListener;
28 import org.zkoss.zk.ui.event.Events;
29 import org.zkoss.zk.ui.ext.AfterCompose;
30 import org.zkoss.zul.Button;
31 import org.zkoss.zul.Grid;
32 import org.zkoss.zul.Label;
33 import org.zkoss.zul.Row;
34 import org.zkoss.zul.Rows;
44 Rows rows = getRows();
46 rows.getChildren().clear();
53 List<HumanResource> list = dao.getResultList(
54 "select hr from HumanResource as hr where hr.active = true order by hr.name");
57 final Row row =
new Row();
59 rows.appendChild(row);
61 row.appendChild(
new Label(hr.getName()));
64 select.addEventListener(Events.ON_CLICK,
new EventListener<Event>() {
66 public void onEvent(Event event) throws Exception {
67 Events.postEvent(new Event(Events.ON_CHANGE, HumanResourceSelector.this, row.getValue()));
70 row.appendChild(select);
static String getString(String key)