西沙璞玉
          愛不容易
          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

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


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


          通過帶參數的構造函數接值

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

          出差管理:

                 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ā)表評論。


          網站導航:
           
          哥哥最近不是很忙
          主站蜘蛛池模板: 巩义市| 大庆市| 泰来县| 凭祥市| 蒙阴县| 靖宇县| 玉门市| 淳安县| 布拖县| 改则县| 舞阳县| 普兰县| 拉孜县| 平陆县| 南昌县| 桓台县| 聊城市| 金乡县| 绥宁县| 萨迦县| 比如县| 安阳县| 炎陵县| 安远县| 丰镇市| 左权县| 潞西市| 登封市| 宁晋县| 揭东县| 凤城市| 红原县| 扶余县| 广州市| 城步| 图们市| 临澧县| 泸定县| 宣化县| 依兰县| 章丘市|