18 package org.turro.erp.resource.logic;
20 import org.turro.auth.Authentication;
21 import org.turro.command.Command;
22 import org.turro.command.Context;
23 import org.turro.elephant.context.Application;
24 import org.turro.elephant.log.LogType;
25 import org.turro.elephant.util.ZkossUtils;
26 import org.turro.erp.aptitude.AptitudeDegreeCombobox;
27 import org.turro.erp.entity.AptitudeDegree;
28 import org.turro.erp.entity.Resource;
29 import org.turro.jpa.Dao;
30 import org.turro.jpa.entity.EntityCollectionUtil;
31 import org.turro.zkoss.dialog.InputDialog;
32 import org.turro.zkoss.dialog.InputField;
33 import org.turro.zul.frame.Framework;
34 import org.zkoss.zk.ui.HtmlBasedComponent;
52 public void delete(
final boolean close) {
55 ZkossUtils.confirmDeletion(
null,
new Command() {
57 public Object execute(Context context) {
69 if(
entity.getId() == 0)
return false;
90 new InputField(
"lAptitude", null, null, 0) {
92 protected HtmlBasedComponent createEditor() {
93 return new AptitudeDegreeCombobox();
98 public Object execute(Context context) {
100 if(fields.length > 0) {
102 if(f.getValue() !=
null &&
"lAptitude".equals(f.getLabel())) {
104 entity.getAptitudeDegrees().add(od);
114 if(aptitudeDegree !=
null) {
115 EntityCollectionUtil.remove(entity.getAptitudeDegrees(), aptitudeDegree);
static String getString(String key)
void deleteAptitude(AptitudeDegree aptitudeDegree)
void delete(final boolean close)
ResourceWrapper(Resource entity)
void logEntity(LogType logType, String path, String action, String data)
static Framework getCurrent()