use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class DeptAction method doDelete.
@Action("delete")
@CommitSuccess
public void doDelete(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
int rn = model.delete(rd);
CoreLocale ln = CoreLocale.getInstance().clone();
ln.load("master");
String ms = ln.translate("core.delete.dept.success", Integer.toString(rn));
helper.reply(ms, rn);
}
use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class UserAction method doSave.
@Action("save")
@Verify(conf = "master", form = "user")
@CommitSuccess
public void doSave(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
// Ignore empty password in update
if ("".equals(rd.get("password"))) {
rd.remove("password");
rd.remove("passcode");
}
String id = model.set(rd);
Map sd = new HashMap();
sd.put("id", id);
sd.put("name", rd.get("name"));
sd.put("head", rd.get("head"));
CoreLocale ln = CoreLocale.getInstance().clone();
ln.load("master");
String ms = ln.translate("core.save.user.success");
helper.reply(ms, sd);
}
use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class FormAction method doDelete.
@Action("delete")
@CommitSuccess
public void doDelete(ActionHelper helper) throws HongsException {
Map data = helper.getRequestData();
int rows = model.delete(data);
CoreLocale lang = CoreLocale.getInstance().clone();
lang.load("matrix");
String ms = lang.translate("core.delete.form.success", Integer.toString(rows));
helper.reply(ms, rows);
}
use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class JointGate method delete.
@Override
@Action("delete")
@Preset(conf = "", form = "", deft = { ":delete" })
@CommitSuccess
public void delete(ActionHelper helper) throws HongsException {
IEntity sr = getEntity(helper);
Map rd = helper.getRequestData();
rd = getReqMap(helper, sr, "delete", rd);
int sn = sr.delete(rd);
String ss = getRspMsg(helper, sr, "delete", sn);
helper.reply(ss, sn);
}
use of app.hongs.action.anno.CommitSuccess in project HongsCORE by ihongs.
the class JointGate method create.
@Override
@Action("create")
@Preset(conf = "", form = "", deft = { ":create" })
@Select(conf = "", form = "", mode = 2)
@Verify(conf = "", form = "")
@CommitSuccess
public void create(ActionHelper helper) throws HongsException {
IEntity sr = getEntity(helper);
Map rd = helper.getRequestData();
rd = getReqMap(helper, sr, "create", rd);
Map sd = sr.create(rd);
sd = getRspMap(helper, sr, "create", sd);
String ss = getRspMsg(helper, sr, "create", 1);
helper.reply(ss, sd);
}
Aggregations