田源
2025-01-09 8a166a60cfd1a2e593ffa103d10c0dc224fc8628
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.vci.client.uif.actions.client;
 
import java.awt.Component;
 
import com.vci.client.common.objects.DeptObject;
import com.vci.client.framework.delegate.RightManagementClientDelegate;
import com.vci.client.portal.utility.PRMItem;
import com.vci.client.ui.exception.VCIException;
import com.vci.client.uif.engine.client.SelectDeptDialog;
import com.vci.client.uif.engine.client.custom.AbstractCustomAttributeInteceptor;
import com.vci.corba.common.VCIError;
 
public class SelectDeptAction extends AbstractCustomAttributeInteceptor{
    /**
     * 
     */
    private static final long serialVersionUID = -7157576009760781065L;
 
    public SelectDeptAction(){
        super();
    }
    public SelectDeptAction(PRMItem item) {
        super(item);
    }
 
    @Override
    public String getCustomAttributeSaveValue(PRMItem prm,
            Component parentComponent) throws VCIError {
        SelectDeptDialog eid = new SelectDeptDialog(parentComponent);
        DeptObject deptObj = eid.getDeptObj();
        return deptObj.getId()+SPLIT_CHAR+deptObj.getName();
    }
 
    @Override
    public String getCustomAttributeDisplayValue(String attrVal, PRMItem prm)
            throws VCIError {
        // TODO Auto-generated method stub
        DeptObject deptObj = null;
         try {
             deptObj = new RightManagementClientDelegate().fetchDepartmentInfoById(attrVal);
        } catch (VCIException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return deptObj.getName();
    }
 
}