我正在使用struts2和hibernate做我的项目,我正在使用jqgrid进行数据显示。现在我想在 editGrid 窗口上为 id 字段设置只读属性。但不适用于添加窗口。我的示例代码
<sjg:grid id="gridtable"
caption="Customer List"
dataType="json"
href="%{remoteurl}"
pager="true"
gridModel="customerList"
rowNum="10"
autowidth="true"
editurl="%{editurl}"
editinline="false"
navigator="true"
navigatorAdd="true"
navigatorAddOptions="
{
viewPagerButtons:false,
recreateForm:true,
checkOnUpdate:true,
closeAfterAdd:true
}"
navigatorDelete="true"
navigatorEdit="true"
navigatorRefresh="true"
navigatorSearch="true"
navigatorEditOptions="
{
viewPagerButtons:false,
recreateForm:true,
checkOnUpdate:true,
closeAfterEdit:true
}"
navigatorDeleteOptions="{ checkOnUpdate:true}"
navigatorViewOptions="
{
viewPagerButtons:false,
recreateForm: true,
checkOnUpdate: true
}"
navigatorSearchOptions="{sopt:['eq','ne','lt','gt','in','ni','cn','nc']}"
navigatorView="true"
rownumbers="true"
rowList="10,20,30"
viewrecords="true"
>
<sjg:gridColumn
name="id"
align="left"
key="true"
index="id"
title="Customer id"
sortable="false"
editable="true"
editrules="{
number: true,
required: true
}"
edittype="text" />
<sjg:gridColumn
name="custName"
align="left"
index="custName"
title="Customer Name"
sortable="false"
editable="true"
edittype="text" />
......
</sjg:grid>
我可以在navigatorEditOption中调用beforeShowForm
和函数吗?afterShowForm