Search in sources :

Example 46 with Action

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);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action)

Example 47 with Action

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);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) Select(io.github.ihongs.action.anno.Select)

Example 48 with Action

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);
}
Also used : CoreLocale(io.github.ihongs.CoreLocale) Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) CommitSuccess(io.github.ihongs.action.anno.CommitSuccess)

Example 49 with Action

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);
}
Also used : CoreLocale(io.github.ihongs.CoreLocale) Map(java.util.Map) Action(io.github.ihongs.action.anno.Action) CommitSuccess(io.github.ihongs.action.anno.CommitSuccess)

Example 50 with Action

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);
}
Also used : Map(java.util.Map) Action(io.github.ihongs.action.anno.Action)

Aggregations

Action (io.github.ihongs.action.anno.Action)64 Map (java.util.Map)53 HashMap (java.util.HashMap)26 CommitSuccess (io.github.ihongs.action.anno.CommitSuccess)22 Preset (io.github.ihongs.action.anno.Preset)15 HongsException (io.github.ihongs.HongsException)14 CoreLocale (io.github.ihongs.CoreLocale)12 NaviMap (io.github.ihongs.action.NaviMap)12 Verify (io.github.ihongs.action.anno.Verify)10 IAction (io.github.ihongs.dh.IAction)10 CoreConfig (io.github.ihongs.CoreConfig)9 Select (io.github.ihongs.action.anno.Select)8 Set (java.util.Set)8 List (java.util.List)7 File (java.io.File)6 HashSet (java.util.HashSet)6 FetchCase (io.github.ihongs.db.util.FetchCase)5 JAction (io.github.ihongs.dh.JAction)4 UserAction (io.github.ihongs.serv.master.UserAction)3 ArrayList (java.util.ArrayList)3