Saturday, February 13, 2010

Grid in struts 2: Using jquery

Define grid.jsp contain


<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<sj:head useJqGridPlugin="true" jqueryui="true" jquerytheme="redmond" />
</head>

<body>

<s:url id="remoteurl" action="actionReturnJSON" />
<sj:grid id="gridtable" caption="Customer Examples" dataType="json"
href="%{remoteurl}"
pager="true"
gridModel="gridModel"
rowList="10,15,20"
rowNum="15"
rownumbers="true"
filter="true"
multiselect="true"
navigator="true"
viewrecords="true">
<sj:gridColumn name="id" index="id" title="ID" formatter="integer"
sortable="false" />
<sj:gridColumn name="name" index="name" title="Name" sortable="true" />
<sj:gridColumn name="country" index="country" title="Country"
sortable="false" />
<sj:gridColumn name="city" index="city" title="City" sortable="false" />
<sj:gridColumn name="creditLimit" index="creditLimit"
title="Credit Limit" formatter="currency" sortable="false" />
</sj:grid>
</body>

No comments:

Post a Comment