如何从数据库中的jsp中加载jqgrid列中的数据?

时间:2014-05-08 06:41:00

标签: oracle jsp datagridview jqgrid

这是我的迷你项目..
这是我的jsp代码:

<body>
<s:form id="up_bank_form" name="up_bank_form" theme="simple" action="up_bank_deposit">
<s:url id="remoteurl" action="up_bank_grid_act"/>
 <s:url id="editid" action="gridcrudurl"/>
  <s:url id="bnkbranch_url" action="bnknamecmbAct1"/>
    <sjg:grid
        id="gridtable"
        caption="ACCOUNT DEPOSIT DETAILS"
        dataType="json"
        loadonce="true"
        href="%{remoteurl}"
        editurl="%{editid}" 
        gridModel="faph_gridModel"
        cssStyle="font-size:10px" 
        pager="true"
        rowList="25,50,75"
        rowNum="0"
        rownumbers="true"
        viewrecords="true"
        width="790" 
        height="250"
        onCompleteTopics="cal_tot"
        footerrow="true"
        userDataOnFooter="true"
        reloadTopics="reloadSearchedClaims"
        navigatorSearch="false" 
        navigatorRefresh="false" 
        navigatorView="false" 
        navigator="true"  
        navigatorAdd="false"
        navigatorDelete="false" 
        navigatorEdit="true"
        editinline="true" 
        onEditInlineAfterSaveTopics="editline"
        onEditInlineErrorTopics="editline_error" 

        >

      <sjg:gridColumn name="refid" index="refid"  title="ref_id" width="20" key="true" hidden="true"/>
       <sjg:gridColumn name="bankname" index="bankname"  title="bankname" width="20" key="true" hidden="false"/>
      <sjg:gridColumn name="branchname" index="branchname"  title="Branch Name" width="90"/>
      <sjg:gridColumn name="accountno" index="accountno"  title="Account No" width="90" edittype="select" editable="true" editoptions= "{dataUrl : '%{bnkbranch_url}'}" surl="%{bnkbranch_url}"  />
      <sjg:gridColumn name="date" index="date" title="Record Date" width="50" formatter="date" align="center" formatoptions= "{srcformat:'y-m-d', newformat: 'd-M-Y' }"/>
      <sjg:gridColumn name="depdate" index="depdate" title="Date" width="50" formatter="date" align="center" formatoptions= "{srcformat:'y-m-d', newformat: 'd-M-Y' }"/>
      <sjg:gridColumn name="amount" index="amount" title="Amount" width="70"  formatter="currency" align="right" sortable="true"  editable="true" edittype="text" />
      <sjg:gridColumn name="status" index="status" width="20" title="Status" /> 
      </sjg:grid>
      </s:form>
</body>

当我编辑一行时,我想从数据库中获取数据并加载到accountno列中。怎么做?
如果你有一些想法,请参考上面的代码并回答我!谢谢!

0 个答案:

没有答案