西沙璞玉
爱不容易
posts - 0,comments - 4,trackbacks - 0

1,spring与struts集成
2,spring注入用注解方式
3,hibernate事务的管理
4,hbm文件自动生成
5,ant  built
6,ext前端。

 

success:true,data:{"userId":10063,"username":"46","email":"0@163.com","department":{},"accessionTime":"2012-04-19","status":1,"title":0,"fullname":"刘岩","delFlag":0}}


回顾

app.js  
 入口函数 等页面加载完毕    Ext.onReady(App.init);  点击入口  App.clickNode   Nodeid不能随便命名 item  id=“Nodeid”
App.import.js  加载哪个js

出差管理功能开发。


同一个action里都是一个session

属性不需要全部加载
transient protected //不序列化这个属性,不加载这个属性,
用注解方式@expose
Gson gson=GsonBuilder().exclude...日期格式化 

或者把hibernate延迟加载去掉

用标签@expose会循环实例化,可在一边去掉这个标签,或者用下面这个方法
延迟加载不好搞,要用下面这个

JSONSerializer json = JsonUtil.getJSONSerializer("createtime");  flexjson


oa是默认目录,变成ent  要手动改两个地方 Form.js.vm View.js.vm
url:_ctxpath+"/ent/$..."

app.import.js.vm也要改

select instance_name from v$instance     查sid


ResumeView.edit = function(id) {
 var tabs = Ext.getCmp('centerTabPanel');
 var ResumeFormPanel = Ext.getCmp('ResumeFormPanel');
 if (ResumeFormPanel != null) {
  tabs.remove('ResumeFormPanel');
 }
 ResumeFormPanel = new ResumeForm(id);
 tabs.add(ResumeFormPanel);
 tabs.activate(ResumeFormPanel);
}


ResumeForm.js里面返回一个panel
var panel = new Ext.Panel({
    id : 'ResumeFormPanel',
    iconCls : 'menu-resume',
    title : '简历详细信息',
    width : 500,
    tbar : toolbar,
    height : 420,
    modal : true,
    layout : 'anchor',
    plain : true,
    bodyStyle : 'padding:5px;',
    buttonAlign : 'center',
    items : [this.setup()]
   });
 return panel;

 

AppUserView.edit = function(userId, username) {
 App.clickTopTab('UserFormPanel_'+userId,{userId:userId,username:username});
};

App.MyDesktopClickTopTab=function(id,params,precall,callback){
 if(precall!=null){
  precall.call(this);
 }
 var tabs = Ext.getCmp('centerTabPanel');
 var tabItem = tabs.getItem(id);
 
 if (tabItem == null) {
  $ImportJs(id, function(view) {
   tabItem = tabs.add(view);
   tabs.activate(tabItem);
  },params);
 }else {
  tabs.remove(tabItem);
  var str='new ' + id ;
  if(params!=null){
   str+='(params);';
  }else{
   str+='();';
  }
  var view= eval(str);
  tabItem = tabs.add(view);
  tabs.activate(tabItem);
 }
};

apply及applyIf方法都是用于实现把一个对象中的属性应用于另外一个对象中,相当于属性拷贝。不同的是apply将会覆盖目标对象中的属性,而applyIf只拷贝目标对象中没有而源对象中有的属性。


UserFormPanel=Ext.extend(Ext.FormPanel,{
 constructor:function(conf){
  Ext.applyIf(this,conf);
  this.userId=this.userId?this.userId:'';


通过带参数的构造函数接值

创建外键,,,

ALTER TABLE PartOrder
 ADD CONSTRAINT PartOrder_Customer_FK
    FOREIGN KEY (CustomerID)
    REFERENCES Customer(CustomerID);


他的name属性对应的是displayfield,而hiddenName对应的则是valuefield

档案管理:
 name : 'empProfileForm.socialInsuranceCode',(由josn映射到当前id)
 mapping : 'socialInsuranceCode'

 fieldLabel : '社会保险号',                 name : 'empProfile.socialInsuranceCode',(由id找到form的name)
 id : 'empProfileForm.socialInsuranceCode',
 xtype:'numberfield'

        private EmpProfile empProfile;(用这个对象 对应前台数据。)

出差管理:

       preName : 'empEvection'  与后台对象对应

 fieldLabel : '用户名',(这里定义id是多余的)
 //id:'empEvection.userName',
 name : 'empEvection.userName',
 maxLength : 8

       private EmpEvection empEvection;

posted on 2012-05-04 13:42 @赵 阅读(258) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
哥哥最近不是很忙