码迷,mamicode.com
首页 > 其他好文 > 详细

eas之action的创建

时间:2019-06-02 18:14:41      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:Nid   window   create   win   new   tst   sso   long   params   

protected KDWorkButton btnFileManage;  
protected ActionFileManage actionFileManage = null;  
  
public void onLoad() throws Exception {  
    super.onLoad();  
  
    this.actionFileManage = new ActionFileManage(this);  
    getActionManager().registerAction("actionFileManage", actionFileManage);  
    this.actionFileManage.addService(new com.kingdee.eas.framework.client.service.PermissionService());  
  
    this.btnFileManage = new KDWorkButton();  
    this.btnFileManage.setEnabled(true);  
    this.btnFileManage.setName("btnFileManage");  
    this.btnFileManage.setAction((IItemAction)ActionProxyFactory.getProxy(actionFileManage, new Class[] { IItemAction.class }, getServiceContext()));         
    this.btnFileManage.setText("档案管理");       
    this.btnFileManage.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTree_layoutproject"));  
  
    this.toolBar.add(btnFileManage);  
          
    this.btnFileManage.setEnabled(true);  
}  
  
protected class ActionFileManage extends ItemAction {  
    public ActionFileManage() {  
        this(null);  
    }  
  
    public ActionFileManage(IUIObject uiObject) {  
        super(uiObject);  
        String _tempStr = null;  
        this.setEnabled(false);  
        _tempStr = "档案管理";  
        this.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);  
        _tempStr = "档案管理";  
        this.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);  
        _tempStr = "档案管理";  
        this.putValue(ItemAction.NAME, _tempStr);  
    }  
  
    public void actionPerformed(ActionEvent e) {  
        getUIContext().put("ORG.PK", getOrgPK(this));  
        innerActionPerformed("eas", ComFileAssoUI.this, "ActionFileManage", "actionFileManage_actionPerformed", e);  
    }  
}  
  
public void actionFileManage_actionPerformed(ActionEvent e) throws Exception {  
    ComUnitInfo comUnitInfo = this.getComUnit();  
    Map params = new UIContext(this);  
    params.put("comUnit", comUnitInfo);  
    params.put("operate", "manage");  
    if(comUnitInfo != null)  
        params.put("mainId", comUnitInfo.getMainId());  
    uiWindow = UIFactory.createUIFactory(UIFactoryName.MODEL).create(  
                "com.kingdee.eas.zsj.propertymanagementend.client.ComFileManageUI", params, null, OprtState.ADDNEW);  
    uiWindow.show();  
}  
 

eas之action的创建

标签:Nid   window   create   win   new   tst   sso   long   params   

原文地址:https://www.cnblogs.com/luojiabao/p/10963577.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!