Grid in Struts2 using struts2-jquery-grid plugin

前端 未结 1 952
面向向阳花
面向向阳花 2020-12-20 02:03

I\'m trying with a Struts jQuery grid using the struts2-jquery-grid-3.7.0 plugin as demonstrated on the showcase, Grid (Editable/Multiselect).

The Struts form:

相关标签:
1条回答
  • 2020-12-20 02:36

    You forgot to include fields to json result that are necessary for grid to function properly. Change to

    @Result(type = "json", params = {"includeProperties", "gridModel\\[\\d+\\]\\.countryId, gridModel\\[\\d+\\]\\.countryName, gridModel\\[\\d+\\]\\.countryCode, total, records, rows, page, sord, sidx, searchField, searchString, searchOper",  "excludeNullProperties", "true"})
    

    Also, json interceptor is not necessary, but params is required.

    @InterceptorRef("params") 
    
    0 讨论(0)
提交回复
热议问题