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

org.webframe.web.springmvc.bean.AjaxSuccess Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
/*
 * wf-web-springmvc
 * Created on 2012-1-30-上午08:30:09
 */

package org.webframe.web.springmvc.bean;

import net.sf.json.JSONObject;

/**
 * Ajax成功信息
 * 
 * @author 黄国庆 
 * @since 2012-1-30 上午08:30:09
 * @version
 */
public class AjaxSuccess extends AjaxJson {

	private JSONObject	success	= null;

	public AjaxSuccess() {
	}

	public AjaxSuccess(JSONObject success) {
		this.success = success;
	}

	public AjaxSuccess putSuccess(String key, String success) {
		createSuccess();
		this.success.put(key, success);
		return this;
	}

	protected JSONObject createSuccess() {
		if (this.success == null) this.success = new JSONObject();
		return this.success;
	}

	@Override
	public String toString() {
		createSuccess();
		putMsg("success", success);
		return super.toString();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy