UserPanel=Ext.extend(EasyJF.Ext.CrudPanel,{
	id:"userPanel",
	title:"用户管理",
	baseUrl:"user.php",
	entityIdName:"id",
	createForm:function(){
	var formPanel=new Ext.form.FormPanel({
		frame:true,
		labelWidth:70,
		labelAlign:'right',
		defaultType:'textfield',
                        defaults:{anchor:"-20"},
                        items:[{xtype:"hidden",name:this.entityIdName},
{ fieldLabel:'用户名',name:'username'  },
{ fieldLabel:'密码',name:'password'  },
{ fieldLabel:'email',name:'email'  },
{ fieldLabel:'用户角色',name:'roleId',value:0,allowBlank: false,blankText:"0为普通用户，1为管理员"},
{xtype : 'label',html : '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">*</font>&nbsp;用户角色：0为普通用户，1为管理员'}
	]
	});

		return formPanel;
    },
    createWin:function(){
    	return this.initWin(438,300,"用户管理");
    },
    storeMapping:["id","username","email","roleId","userrole"],
	initComponent : function(){
    this.cm=new Ext.grid.ColumnModel([
        new Ext.grid.RowNumberer(),
{header: "用户名", sortable:true,width: 300, dataIndex:"username"},
{header: "email", sortable:true,width: 300, dataIndex:"email"},
{header: "用户角色", sortable:true,width: 300, dataIndex:"userrole"}
        ]);
	UserPanel.superclass.initComponent.call(this);
}
});