Dorado重用最佳实践

dorado用后总结 

http://xiangtui.iteye.com/blog/675693 



==============dorado7 AutoMappingDropDown总结================== 

建立一个文本框. 

文本框中 配置 

 mapping 

 keyProperty value 

 mapValues [Entity] 

 valueProperty label 


其中Entity [{"label":"全部","value":"-1"},{"label":"小于零","value":"smallzero"}] 


配置时候,一个entity 建立label:全部 

 value: -1 


建立一个AutoMappingDropDown drop1 


文本框使用tregger 关联 drop1 


========================================================== 

dataSet个数获取. 

var i=self.getData().entityCount; 


downInfo.getDom().innerHTML="<font size=2>"+text+"</font>" ; 

var TradeForm=this.id("TradeForm"); 

TradeForm.get("entity").shopNick = shopNick; 

ds.set("parameter",TradeForm.get("entity")); 


var shopNick = this.get("#shopEdit").get("text"); 



============================================== 

var curGoodsList = this.get("#dsGoodsPkg").getData("#.subGoodsRef"); 


dataPath : #.specs 

dataSet : dsGoods 



======================================= 

var grid=this.id("gridSpecDefValues1"); 

grid.filter([{ 

 property:'specValue', 

 operator:'like', 

 value:condition 

}]); 



================================================ 

常用 

Action提交的时候dataSet类型问题: 

api地址:dorado.DataPath 

#current 表示当前Entity,如果有refrence,那么也会提交. 

#all 多个一级对象,以及所有一级对象下的refrence 

#dirty_tree 只是修改过的数据. 树状结构. 


今天没修改的数据没提交过去,就是因为使用了#dirty_tree 

======================================================= 

另外,父子结构的数据提交.点击添加后,然后编辑后单据详情数据不显示的问题. 

是因为 详情的grid 数据没刷新导致的. 

在弹出的dialog,onshow()加入 

this.get("#dgSaleInvBillDetail").refresh(); 


============================================================= 

列表页refence加载的问题. 


列表页,refrence加载 

 <Reference name="saleInvBillDetail"> 

 <Property name="dataProvider">notOnlineSaleBillInterceptor#getSaleInventoryBillDetailList</Property> 

 <Property name="dataType">[SalInvBillDetailBeanType]</Property> 

 <Property name="parameter">$${this.billID}</Property> 

 <Property name="activeAtClient">false</Property> 

 </Reference> 


列表页,refrence不加载 

 <Reference name="detailRef"> 

 <Property name="dataType">[StockBillDetailType]</Property> 

 <Property name="dataProvider">stockBillSearchInterceptor#getStockBillDetailList</Property> 

 <Property name="parameter">$${this.stock_uid}</Property> 

 <Property name="submittable">true</Property> 

 </Reference> 


activeAtClient 设置为true则在点击的时候再加载. 

默认情况下,refrence是不加载的. 


==================富文本编辑器===================================== 


dorado的htmledit 



http://ueditor.baidu.com/website/changelog.html