use of io.github.ihongs.action.anno.Action in project HongsCORE by ihongs.
the class FormAction method isUnique.
@Action("unique")
public void isUnique(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
boolean un = model.unique(rd);
helper.reply(null, un ? 1 : 0);
}
use of io.github.ihongs.action.anno.Action in project HongsCORE by ihongs.
the class FormAction method getList.
@Action("list")
@Select(conf = "matrix", form = "form")
public void getList(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
Map sd = model.getList(rd);
helper.reply(sd);
}
use of io.github.ihongs.action.anno.Action in project HongsCORE by ihongs.
the class FormAction 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("matrix");
String ms = ln.translate("core.delete.form.success", null, Integer.toString(rn));
helper.reply(ms, rn);
}
use of io.github.ihongs.action.anno.Action in project HongsCORE by ihongs.
the class UnitAction 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("matrix");
String ms = ln.translate("core.delete.unit.success", null, Integer.toString(rn));
helper.reply(ms, rn);
}
use of io.github.ihongs.action.anno.Action in project HongsCORE by ihongs.
the class UnitAction method getList.
@Action("list")
public void getList(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
Map sd = model.getList(rd);
helper.reply(sd);
}
Aggregations