yuxc
2025-01-15 c09f81131e8b7c83937206d7cf76f34d2020be75
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.engine.client.controls;
 
import java.util.List;
import java.util.Map;
 
import com.vci.client.portal.utility.PRMItem;
import com.vci.client.uif.engine.client.custom.ICustomAttributeInteceptor;
 
/**
 * 用户选择控件
 * <p>返回的都是</p>
 * @author xiongchao
 *
 */
public class UserChooseControl extends BaseCustomControl {
    /**
     * 
     */
    private static final long serialVersionUID = -8097238918177976518L;
 
    public UserChooseControl(){
        super();
    }
    
    public UserChooseControl(PRMItem item) {
        super(item);
    }
 
    @Override
    protected ICustomAttributeInteceptor getCustomInteceptorInstance(){
        ICustomAttributeInteceptor res = null;
        String className = getPRMItem().getItemValue();
        try{
            if(className == null || "".equals(className)) {
                className = "plm.uif.actions.client.SelectorUserAction";
            }
            Object obj = Class.forName(className).getConstructor(null).newInstance(null);
            if(obj == null) return res;
            if(obj instanceof ICustomAttributeInteceptor){
                res = (ICustomAttributeInteceptor)obj;
                res.setCustomControl(this);
            }
        }catch(Exception ex){
            ex.printStackTrace();
        }
        return res;
    }
}