铝板价格行情:jquery+json+ajax二级分类
来源:百度文库 编辑:九乡新闻网 时间:2024/10/05 22:39:45
配置文件manager-config.xml:
----------------------------------------java类:@SuppressWarnings("serial")
@Scope("prototype")
@Controller("com.cms.action.manager.sys.ajax")
public class ColorAjax extends ajax_baseImp{
private transient int cate_id;
@Autowired
private color_Server> base;public void getcolor(){
Object temp=base.HqlExecute("from fwe_color where cate_id=:cate_id",new SqlOrHqlParameter("cate_id",cate_id));
JSONArray jsonArray=JSONArray.fromObject(temp);
super.renderHtml(jsonArray.toString());
}public int getCate_id() {
return cate_id;
}public void setCate_id(int cate_id) {
this.cate_id = cate_id;
}}-----------------------------
import org.springframework.beans.factory.annotation.Autowired;
import com.cms.base.structs2.ContextPvd;@SuppressWarnings("unchecked")
public class ajax_baseImp extends ActionOutString implements java.io.Serializable{
private static final long serialVersionUID = 5637966337178063634L;
@Autowired
protected ContextPvd contextPvd;
} -------------------------------------import java.io.IOException;import javax.servlet.http.HttpServletResponse;import org.apache.struts2.ServletActionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;import com.opensymphony.xwork2.ActionSupport;public class ActionOutString extends ActionSupport implements java.io.Serializable{ private static final long serialVersionUID = -1197476918924605433L;
private static final Logger log = LoggerFactory
.getLogger(ActionOutString.class);
/**
* 绕过Template,直接输出内容的简便函数.
*/
protected String render(String text, String contentType) {
try {
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(contentType);
response.getWriter().write(text);
} catch (IOException e) {
log.error(e.getMessage(), e);
}
return null;
}
/**
* 直接输出字符串.
*/
protected String renderText(String text) {
return render(text, "text/plain;charset=UTF-8");
} /**
* 直接输出HTML.
*/
protected String renderHtml(String html) {
return render(html, "text/html;charset=UTF-8");
} /**
* 直接输出XML.
*/
protected String renderXML(String xml) {
return render(xml, "text/xml;charset=UTF-8");
}
} 页面:
@Scope("prototype")
@Controller("com.cms.action.manager.sys.ajax")
public class ColorAjax extends ajax_baseImp{
private transient int cate_id;
@Autowired
private color_Server> base;public void getcolor(){
Object temp=base.HqlExecute("from fwe_color where cate_id=:cate_id",new SqlOrHqlParameter("cate_id",cate_id));
JSONArray jsonArray=JSONArray.fromObject(temp);
super.renderHtml(jsonArray.toString());
}public int getCate_id() {
return cate_id;
}public void setCate_id(int cate_id) {
this.cate_id = cate_id;
}}-----------------------------
import org.springframework.beans.factory.annotation.Autowired;
import com.cms.base.structs2.ContextPvd;@SuppressWarnings("unchecked")
public class ajax_baseImp extends ActionOutString implements java.io.Serializable{
private static final long serialVersionUID = 5637966337178063634L;
@Autowired
protected ContextPvd contextPvd;
} -------------------------------------import java.io.IOException;import javax.servlet.http.HttpServletResponse;import org.apache.struts2.ServletActionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;import com.opensymphony.xwork2.ActionSupport;public class ActionOutString extends ActionSupport implements java.io.Serializable{ private static final long serialVersionUID = -1197476918924605433L;
private static final Logger log = LoggerFactory
.getLogger(ActionOutString.class);
/**
* 绕过Template,直接输出内容的简便函数.
*/
protected String render(String text, String contentType) {
try {
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(contentType);
response.getWriter().write(text);
} catch (IOException e) {
log.error(e.getMessage(), e);
}
return null;
}
/**
* 直接输出字符串.
*/
protected String renderText(String text) {
return render(text, "text/plain;charset=UTF-8");
} /**
* 直接输出HTML.
*/
protected String renderHtml(String html) {
return render(html, "text/html;charset=UTF-8");
} /**
* 直接输出XML.
*/
protected String renderXML(String xml) {
return render(xml, "text/xml;charset=UTF-8");
}
} 页面:
jquery+json+ajax二级分类
JSON与AJAX - 内部share
jquery ajax 属性解释
jQuery.ajax参数列表
jquery+json 实例 (当jquery遇上了json )
jQuery选择器分类
jQuery ajax实现顶一下,踩一下效果
jQuery Ajax 应用实例解析大全 - 欢迎来到程序员之家论坛
文件管理系统(JQuery插件 Ajax) - Yes I Can - 博客园
JQuery
json 基础知识
json.js
Ajax 简介
AJAX缓存
ExtJs Ajax
Flex Json文档.txt
JSON.js test
Linq to Json
MVC中Return Json()
android 解析json数据格式
jquery trigger
jquery插件
jQuery基础
jQuery选择器