DORADO中resoler&dataProvider的常用方法

 DoradoAdapter.java 

public class org.marmot.ext.common.adapter.DoradoAdapter extends org.marmot.ext.common.adapter.DoradoAdapterBase implements org.marmot.ext.common.adapter.IDoradoAdapter {
  
  //查询所有	
  public void queryAll(org.marmot.view.DataSet dataSet) throws org.marmot.ext.common.exception.CustomException;
  
  //查询按分页
  public void queryWithPage(org.marmot.view.DataSet dataSet) throws org.marmot.ext.common.exception.CustomException;
  
  //用于修改(改动过的全部更新)
  public java.lang.Object updateCollectionAllChanged(java.util.Map dataSetMap, java.lang.Object parameter) throws org.marmot.ext.common.exception.CustomException;
  
  //远程调用
  public java.lang.Object rpc(java.lang.Object parameter) throws org.marmot.ext.common.exception.CustomException;

  public java.lang.Object updateSingle(java.util.Map dataSetMap, java.lang.Object parameter) throws org.marmot.ext.common.exception.CustomException;
  
  public java.lang.Object updateCollection(java.util.Map dataSetMap, java.lang.Object parameter) throws org.marmot.ext.common.exception.CustomException;
  
  public java.lang.Object updateMultiCollection(java.util.Map dataSetMap, java.lang.Object parameter) throws org.marmot.ext.common.exception.CustomException;
     
  public java.lang.Object updateMultiCollectionAllChanged(java.util.Map dataSetMap, java.lang.Object parameter) throws org.marmot.ext.common.exception.CustomException;
    

*所用的resolver匀为doradoAdapter

MarmotUpdateCommand (方法:updateCollectionAllChanged 批量更新)可用于更新操作

MarmotRPCCommand (方法:rpc) 可用于从后台方法中返回数据操作、查询显示操作

RequestCommand 可用于弹出窗口操作

Export2ExcelCommand



ENN项目中所有的按钮匀未绑定以上的Command,都是通过button的onclick事件来传值 

QueryCommand 绑定 查询按钮 (QueryCommand所需事件:beforeExecute())
-------------------
var employee_name = datasetCondition.getValue("employee_name");
if (employee_name) {
  command.parameters().setValue("employee_name", "%" + employee_name + "%");
}
else {
  command.parameters().setValue("employee_name", "");
}
-------------------

重置表单按钮onclick事件
-----------------------
datasetserch.setValue('subty',null);
datasetserch.setValue('leaveState',null);
datasetserch.setValue('startTime','${Session.sessionStartDate}');//后台传输的参数开始时间
datasetserch.setValue('endTime','${Session.sessionDate}');//后台传输的参数开始时间
datasetserch.refreshControls();
-----------------------

  

posted @ 2012-02-22 17:04  cyjch  阅读(1363)  评论(0编辑  收藏  举报