dep拓展的单头字段,如何用java代码拿该字段的值

//1、先创建控件对象
	KDCheckBox chkkDCheckBox = new KDCheckBox();
//2、给控件对象赋值
		Hashtable hashTable = new Hashtable();	    	
    	DEPUtils.findComponent(this, new String[]{"chkkDCheckBox"},hashTable);
    	if(hashTable.size()> 0) {
    		if(hashTable.get("chkkDCheckBox")!=null){
    			chkkDCheckBox = (KDCheckBox)hashTable.get("chkkDCheckBox");
    		}	
    	}
//3、拿该控件对象的值(此处的控件时boolean类型)
	 boolean boolean1 = chkkDCheckBox.isSelected();


//下面是工具类
/*jadclipse*/
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) radix(10) lradix(10) 
// Source File Name:   DEPUtils.java

package com.kingdee.eas.uushtg.util;

import com.kingdee.bos.metadata.IMetaDataLoader;
import com.kingdee.bos.metadata.MetaDataLoaderFactory;
import com.kingdee.bos.metadata.entity.EntityObjectInfo;
import com.kingdee.bos.util.BOSObjectType;
import java.awt.Component;
import java.awt.Container;
import java.util.Hashtable;

public class DEPUtils
{

    public DEPUtils()
    {
    }

    public static void findComponent(Component comp, String controls[], Hashtable found)
    {
        Container con = null;
        boolean nameEquals = false;
        String CompName = null;
        if(comp instanceof Container)
        {
            CompName = comp.getName();
            if(CompName != null)
            {
                for(int i = 0; i < controls.length; i++)
                {
                    if(!CompName.equals(controls[i]) || found.containsKey(CompName))
                        continue;
                    found.put(CompName, comp);
                    nameEquals = true;
                    break;
                }

            }
            if(found.size() != controls.length)
            {
                con = (Container)comp;
                int count = con.getComponentCount();
                for(int i = 0; i < count; i++)
                {
                    findComponent(con.getComponent(i), controls, found);
                    if(found.size() == controls.length)
                        return;
                }

            }
        }
    }

    public static String getEntityName(String bostype)
    {
        IMetaDataLoader imetadataloader = MetaDataLoaderFactory.getRemoteMetaDataLoader();
        EntityObjectInfo entityobjectinfo = imetadataloader.getEntity(BOSObjectType.create(bostype));
        return entityobjectinfo.getName();
    }
}


/*
	DECOMPILATION REPORT

	Decompiled from: D:\BOS\shtg\Project_0\lib\sp\uushtg_class.jar
	Total time: 52 ms
	Jad reported messages/errors:
	Exit status: 0
	Caught exceptions:
*/
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值