首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

Spring Json View之高速开始(二)

2012-10-31 
Spring Json View之快速开始(二)快速开始-用SimpleForm-Controller提交GET/POST请求??Command-Controller

Spring Json View之快速开始(二)

快速开始-用SimpleForm-Controller提交GET/POST请求
?
?Command-Controller提供一个完整的CommandBean,Spring对它提供校验和绑定支持。这个示例在Command-Controller中返回一个Model-Map的Json字符串,json视图返回信息中包含字段错误、全局错误和绑定。支持CommandBean属性类型的转换。

通过formBackingObject方法触发GET请求。通过onSubmitAction方法出发POST请求。

?

详细信息参见文档


?
Spring ApplicationContext
?

?

Spring view.xml

?

JavaScript behaviour-roles.js

?

CommandBean

?

Response-Status : 311{ "failure":"true", "exception.message":"java.lang.Exception: You throw an exeption !", "exception.stacktrace": "java.lang.Exception: You throw an exeption ! \n\tat org.thing.spring.json.controller.[...] \n\tat org.springframework.web.servlet.mvc.[...] [...]"}
?

热点排行