У меня есть JSP, который использует struts 2 jquery tags.Struts2 jquery action, возвращающий всю форму на успех
The form is :
<s:form data-role="content" class="center-btn" id="sortForm"
theme="simple">
<s:textfield name="item" id="item"/>
<s:textfield name="acc" id="acc"/>
</s:form>
Have a action:
@Action(value = "getLPNDetails", results = {
@Result(name = SUCCESS, type = JSON, params = { "ignoreHierarchy", "false", "includeProperties",
"sortForm\\..*,actionMessages\\[\\d+\\], fieldErrors\\[\\d+\\], actionErrors\\[\\d+\\]" }),
@Result(name = INPUT, location = "sortMUIDMobile.jsp", params = { "ignoreHierarchy", "false",
"includeProperties",
"url\\..*, actionMessages\\[\\d+\\], fieldErrors\\[\\d+\\], actionErrors\\[\\d+\\]" }),
@Result(name = ERROR, location = "sortMUIDMobile.jsp", params = { "ignoreHierarchy", "false",
"includeProperties",
"sortForm\\..*, actionMessages\\[\\d+\\], fieldErrors\\[\\d+\\], actionErrors\\[\\d+\\]" }) })
public String getLPNDetails() {
}
Что я звоню из:
function lpnFilter() {
var param = $('#sortForm').serialize();
//var jsonValidationParam = "&struts.enableJSONValidation=true";
//param = param + jsonValidationParam;
$.ajax({
type : 'POST',
url : 'getLPNDetails',
data : param,
success : function(data) {
alert(JSON.stringify(data));
//alert(data.lpn);
},
async : false
});
//$('#lpnDetails').show();
}
сейчас:
@Action(value = "getLPNDetails", results = {
@Result(name = SUCCESS, type = JSON, params = { "ignoreHierarchy", "false", "includeProperties",
"sortForm\\..*,actionMessages\\[\\d+\\], fieldErrors\\[\\d+\\], actionErrors\\[\\d+\\]" }),
не возвращает все значения формы. Есть ли способ сделать это?
принять ответ –