All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nutz.web.ajax.Ajax Maven / Gradle / Ivy

Go to download

Nutz, which is a collections of lightweight frameworks, each of them can be used independently

There is a newer version: 1.r.67
Show newest version
package org.nutz.web.ajax;

import org.nutz.lang.util.NutMap;

public abstract class Ajax {

    public static AjaxReturn ok() {
        AjaxReturn re = new AjaxReturn();
        re.ok = true;
        return re;
    }

    public static AjaxReturn fail() {
        AjaxReturn re = new AjaxReturn();
        re.ok = false;
        return re;
    }

    public static AjaxReturn expired() {
        AjaxReturn re = new AjaxReturn();
        re.ok = false;
        re.msg = "ajax.expired";
        return re;
    }

    /**
     * @return 获得一个map,用来存放返回的结果。
     */
    public static NutMap one() {
        return new NutMap();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy