Since the project front-end uses Extjs4, list paging needs to return three parameters: totalCount (total number of records), start (starting position), and limit (number of items per page). Since there will be many grids in the project that need paging, I want to put the paging information in a separate Action class. The Action that needs paging can directly inherit this class. The original struts.xml configuration is as follows:
However, the struts-json plug-in does not cascade serialize the parent class by default, that is, it cannot return the parent class attributes. After checking the data, it is found that the following parameters can be added to the result.