码迷,mamicode.com
首页 > 其他好文 > 详细

portal开发怎么配置一个新增按钮,同时在“新增按钮”中配置关联表的查询(四)

时间:2015-11-19 01:54:46      阅读:425      评论:0      收藏:0      [点我收藏+]

标签:

我在配置这个东西的时候主要的问题是卡在哪里呢?

就看到看懂那个.wd文件

  1 <Models>
  2         <Datasets>
  3             <RefMdDataset caption="HR部门" controlwidgetopeStatus="false" enabled="false" id="$refds_hrjf_hrdept" lazyLoad="true" notNullBody="false" 
  4                 objMeta="hrjf.hrdept" voMeta="nc.vo.om.hrdept.HRDeptVO">
  5                 <Fields>
  6                 </Fields>
  7             </RefMdDataset>
  8             
  9            
 10             
 11             
 12             <MdDataset caption="考勤月报申请单" controlwidgetopeStatus="false" enabled="false" id="dataset_attmonthlycard" lazyLoad="false" notNullBody="false" 
 13                 objMeta="hrss.attmonthapply" voMeta="nc.vo.hrss.attendancemonthly.AttmonthapplyVO">
 14                 <FieldRelations>
 15                     <FieldRelation id="transtypeid_rel" needProcess="true" refDataset="$refds_uap_BilltypeVO">
 16                         <MatchFields>
 17                             <Field readField="billtypename" writeField="transtypeid_billtypename">
 18                             </Field>
 19                         </MatchFields>
 20                         <WhereField>
 21                             <Field key="pk_billtypeid" value="transtypeid">
 22                             </Field>
 23                         </WhereField>
 24                     </FieldRelation>
 25                 
 26                     
 27                     
 28                 </FieldRelations>
 29                 
 30 
 31                 
 32                 <Fields>
 33                     <Field dataType="String" id="pk_dept_name" field="pk_dept_name" nullAble="true" primaryKey="false" text="部门名称">
 34                     </Field>
 35                     <Field dataType="String" id="pk_org_name" field="pk_org_name" nullAble="true" primaryKey="false" text="组织名称">
 36                     </Field>
 37                    <Field dataType="String" id="pk_peroid_name" field="pk_peroid_name" nullAble="true" primaryKey="false" text="组织名称">
 38                     </Field>
 39                     
 40                     
 41                     <ModifyField id="bill_code" nullAble="false">
 42                     </ModifyField>
 43                 </Fields>
 44                 
 45                 
 46                 <Events>
 47                     <Event async="true" jsEventClaszz="nc.uap.lfw.core.event.conf.DatasetListener" methodName="onDataLoad" name="onDataLoad" 
 48                         onserver="true">
 49                         <SubmitRule cardSubmit="false" panelSubmit="false" tabSubmit="false">
 50                         </SubmitRule>
 51                         <Params>
 52                             <Param>
 53                                 <Name>dataLoadEvent</Name>
 54                                 <Value>
 55                                 </Value>
 56                                 <Desc> <![CDATA[]]> </Desc>
 57                             </Param>
 58                         </Params>
 59                         <Action>
 60                         </Action>
 61                     </Event>
 62                 
 63                 </Events>
 64             </MdDataset>
 65             
 66             
 67 
 68             
 69             
 70             
 71         
 72           <RefMdDataset caption="工作记录" controlwidgetopeStatus="false" enabled="false" id="$refds_hrhi_hi_psnjob" lazyLoad="true" notNullBody="false" objMeta="hrhi.hi_psnjob" voMeta="nc.vo.hi.psndoc.PsnJobVO">
 73                 <Fields>
 74                     <ModifyField id="clerkcode" nullAble="false">
 75                     </ModifyField>
 76                     <ModifyField id="pk_psncl" nullAble="false">
 77                     </ModifyField>
 78                     <ModifyField id="begindate" nullAble="false">
 79                     </ModifyField>
 80                     <ModifyField id="pk_group" nullAble="false">
 81                     </ModifyField>
 82                     <ModifyField id="pk_org" nullAble="false">
 83                     </ModifyField>
 84                 </Fields>
 85             </RefMdDataset>
 86             
 87             
 88             
 89             
 90             
 91             
 92             
 93             
 94             <RefMdDataset caption="用户" controlwidgetopeStatus="false" enabled="false" id="$refds_uap_user" lazyLoad="true" notNullBody="false" 
 95                 objMeta="uap.user" voMeta="nc.vo.sm.UserVO">
 96                 <Fields>
 97                 </Fields>
 98             </RefMdDataset>
 99             <RefMdDataset caption="单据类型" controlwidgetopeStatus="false" enabled="false" id="$refds_uap_BilltypeVO" lazyLoad="true" 
100                 notNullBody="false" objMeta="uap.BilltypeVO" voMeta="nc.vo.pub.billtype.BilltypeVO">
101                 <Fields>
102                 </Fields>
103             </RefMdDataset>
104             
105             <RefMdDataset caption="组织" controlwidgetopeStatus="false" enabled="false" id="$refds_uap_org" lazyLoad="true" notNullBody="false" 
106                 objMeta="uap.org" voMeta="nc.vo.org.OrgVO">
107                 <Fields>
108                 </Fields>
109             </RefMdDataset>
110         
111         </Datasets>
112     
113         <RefNodes>
114             
115             <NCRefNode allowInput="false" dataListener="" dialogHeight="" dialogWidth="" i18nName="w_trn-000074" 
116                 id="refnode_dataset_attmonthlycard_creator_user_name" langDir="node_hi-res" multiSel="false" orgs="false" pagemeta="reference" pagemodel="" 
117                 readDs="masterDs" readFields="cuserid,user_name" refId="" refcode="用户" refnodeDelegator="" selLeafOnly="false" text="离职申请单_用户" 
118                 usePower="false" writeDs="dataset_attmonthlycard" writeFields="creator,creator_user_name">
119             </NCRefNode>             
127         </RefNodes>
128     </Models>
129     <Components>      
139          <GridComp autoRowHeight="true" canCopy="false" caption="考勤月报" dataset="dsMonthReport" editable="true" enabled="true" expandTree="false" id="gridMonthReport" multiSelect="false" pagenationTop="false" reference="false" selfDefImageBtnRender="" showColInfo="false" showHeader="true" showImageBtn="true" showNumCol="false" showSumRow="false" sortable="true" visible="true">
140             
141             <Column autoExpand="false" dataType="String"  editable="false" editorType="StringText" field="pk_psnjob_clerkcode" fixedHeader="false" i18nName="w_ta-001222" id="pk_psnjob_clerkcode" imageOnly="false" langDir="node_ta-res" nullAble="true" renderType="DefaultRender" showCheckBox="true" sortable="true" sumCol="false" text="员工号" textAlign="center" visible="false" width="120">
142             </Column> 
145         </GridComp>      
149     </Components>

重点关注 colum 跟NCRefNode,在中通过id会找到NCRefNode中的对应的关联的那个,然后通过readfiled字段跟writefiled字段就可以对应的关联子表(readfield)的数据写道主表的字段(writefield)。

如果是要配置点击某条数据直接可以查询的话是要配置《fieldRelation》字段,

这两者都要配置Refnode,这个Refnode其实是配置VO的,就是数据集。然后上面两种是公用这种VO的

感觉自己的还是写的有点不清楚!等之后有截图在详细补上

portal开发怎么配置一个新增按钮,同时在“新增按钮”中配置关联表的查询(四)

标签:

原文地址:http://www.cnblogs.com/zzzzw/p/4976424.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!