西沙璞玉
          愛不容易
          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  
           入口函數(shù) 等頁面加載完畢    Ext.onReady(App.init);  點擊入口  App.clickNode   Nodeid不能隨便命名 item  id=“Nodeid”
          App.import.js  加載哪個js

          出差管理功能開發(fā)。


          同一個action里都是一個session

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

          或者把hibernate延遲加載去掉

          用標簽@expose會循環(huán)實例化,可在一邊去掉這個標簽,或者用下面這個方法
          延遲加載不好搞,要用下面這個

          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方法都是用于實現(xiàn)把一個對象中的屬性應用于另外一個對象中,相當于屬性拷貝。不同的是apply將會覆蓋目標對象中的屬性,而applyIf只拷貝目標對象中沒有而源對象中有的屬性。


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


          通過帶參數(shù)的構(gòu)造函數(shù)接值

          創(chuàng)建外鍵,,,

          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;(用這個對象 對應前臺數(shù)據(jù)。)

          出差管理:

                 preName : 'empEvection'  與后臺對象對應

           fieldLabel : '用戶名',(這里定義id是多余的)
           //id:'empEvection.userName',
           name : 'empEvection.userName',
           maxLength : 8

                 private EmpEvection empEvection;

          posted on 2012-05-04 13:42 @趙 閱讀(263) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導航:
           
          哥哥最近不是很忙
          主站蜘蛛池模板: 固原市| 五常市| 牡丹江市| 托克逊县| 曲靖市| 郸城县| 海林市| 平安县| 偃师市| 东兴市| 五家渠市| 宁夏| 吴川市| 云林县| 沁源县| 万安县| 桃江县| 都安| 鲁甸县| 四会市| 安丘市| 兴和县| 徐水县| 永兴县| 沛县| 昂仁县| 蒙阴县| 阿拉善盟| 镇远县| 将乐县| 华池县| 丽水市| 谷城县| 东城区| 揭阳市| 江孜县| 古浪县| 多伦县| 临汾市| 娄底市| 贡嘎县|