UserinfoMainView

$ns("userinfo.views");

$import("mx.datacontainers.TreeEntityContainer");
$import("mx.datacontrols.DataTree");
$import("mx.datacontrols.DataForm");

userinfo.views.UserinfoMainView = function()
{
    var me = $extend(mx.views.View);
    var base = {};
   
    me.treeView = null;
   
    base.init = me.init;
    me.init = function()
    {
        base.init();
       
        _initControls();
    };
   
    function _initControls()
    {
     {
         me.form = new mx.datacontrols.DataForm({
          baseUrl :cjUnit.mappath("~/rest/projunit/"),
             primaryKey : "id",
             fields: [
                 { name: "id", caption: "主键", editorType: "TextEditor"},
                 { name: "userName", caption: "用户名", editorType: "TextEditor",readOnly:true},
                 { name: "password", caption: "密码", editorType: "TextEditor",textMode:"password",lineBreak:false,readOnly:true},
                 { name: "mobile", caption: "手机号码", editorType: "TextEditor",readOnly:true},
                 { name: "email", caption: "邮件地址", editorType: "TextEditor",lineBreak:false,readOnly:true},
                 { name: "unicode", caption: "间隔单元", editorType: "TextEditor",readOnly:true},
                 { name: "startUsefulLife", caption: "有效期", editorType: "TextEditor",lineBreak:false,readOnly:true}
             ]
            });
         me.form.load("1");
            me.addControl(me.form);

            me.on("activate", me.controller._onactivate);
        }
    }
   
    /*
     * 初始化并加装树视图。
     */
    function _initTreeView()
    {
        me.treeView = new mx.datacontrols.DataTree({
            baseUrl: userinfo.mappath("~/rest"),
           
            displayCheckBox: true, // 是否需要在树中显示选中框
            onselectionchanged: me.controller._tree_selectionchanged
        });
       
        me.treeView.load();
       
        me.addControl(me.treeView);
    }
   
    return me.endOfClass(arguments);
};

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值