Open sytolk opened 7 years ago
If jou want to avoid one I/O request cycle, you can simply use the gridModel
attribute of the grid tag.
It will retrieve data from the action, so no need to use AJAX.
You'll find sample code in the showcase app http://struts.jgeppert.com/struts2-jquery-showcase/.
Can I skip href parameter
<sjg:grid dataType="json" href="%{remoteurl}"
and one I/O request and load local JSON ordatatype: "local
data like this: http://stackoverflow.com/questions/6831306/load-local-json-data-in-jqgrid-without-addjsonrowsIf I load array of grid rows in the struts2 Action and write it like JavaScript array in web page its not need browser with JavaScript (Ajax) to call another Struts2 Action which return JSON data. Its need to have only:
<sjg:grid data=strutsActionArray