I am trying to make a grid by using Struts 2 jquery grid plugin along with struts jquery plugin and struts json plugin. I am beginner to this.
Here is my JSP code:
The grid
tag shouldn't be self-closed, it should have a body where you put gridCoumn
tags.
The name
of the column should be a property of the gridModel
, and as a bean's property must be an identifier, i.e. without spaces.
Grid model should be a list of objects that a reserialized to JSON via invoking an action that you use in href
attribute.
<sjg:grid id="gridTable" caption="login ID" dataType="json"
href="%{remoteurl}" pager="true" gridModel="gridModel"
rowList="10,15,20" rowNum="15" rownumbers="true">
<sjg:gridColumn name="loginID"/>
<sjg:gridColumn name="select" />
</sjg:grid>
You can find an example of the grid using the project wiki page for Grid Tag.