DataUtility 入门教程一[下拉列表:Combobox]
来源:互联网 发布:云计算技术 2016 编辑:程序博客网 时间:2024/06/05 17:51
一、效果
二、代码
public class SelectFollowProductCertDataUtility extends AbstractDataUtility {@Overridepublic Object getDataValue(String component_id, Object datum, ModelContext mc)throws WTException { Object component = null; ComponentMode componentMode = mc.getDescriptorMode(); component = createPushButtonAndTextBox(component_id, datum, mc, componentMode); return component;} private Object createPushButtonAndTextBox(String component_id, Object datum, ModelContext mc, ComponentMode componentMode) throws WTException { String defaultValue = "false"; String oid = ""; if (datum instanceof CertClassificationLink) { CertClassificationLink link = (CertClassificationLink)datum; boolean isFollowProduct = link.isFollowProductCert(); if (isFollowProduct) { defaultValue = "true";} oid = String.valueOf(link.getPersistInfo().getObjectIdentifier().getId());}else if (datum instanceof LWCStructEnumAttTemplate) { LWCStructEnumAttTemplate node = (LWCStructEnumAttTemplate) datum; oid = String.valueOf(node.getPersistInfo().getObjectIdentifier().getId());} List<GuiComponent> components = new ArrayList<GuiComponent>(); ArrayList<String> labels = new ArrayList<String>(); labels.add("非随机"); labels.add("随机"); ArrayList<String> values = new ArrayList<String>(); values.add("false"); values.add("true"); ArrayList<String> selecteds = new ArrayList<String>(); selecteds.add(defaultValue);//默认选中,注意类型 ComboBox combo = new ComboBox(values,labels,selecteds); combo.setId(oid +"_"+component_id); combo.setName(oid +"_"+component_id); combo.setEnabled(true); combo.setEditable(true); combo.setReadOnly(false); components.add(combo); return new GUIComponentArray(components); }}
0 0
- DataUtility 入门教程一[下拉列表:Combobox]
- ExtJs 入门教程十[下拉列表:Combobox]
- ExtJs 入门教程十一[下拉列表:Combobox]
- 无废话ExtJs 入门教程十一[下拉列表:Combobox]
- 下拉列表:comboBox控件
- ComboBox下拉列表
- DataUtility 入门教程二[按钮:Button]
- DataUtility 入门教程二[按钮:RadioButton]
- 下拉列表comboBox的使用
- ext下拉列表(ComboBox篇)
- C#-comboBox-下拉列表---ShinePans
- Tkinter的下拉列表Combobox
- comboBox二级联动下拉列表
- Processor 入门教程一[处理 ComboBox]
- 如何实现ComboBox下拉列表显示图片
- ComboBox自动匹配下拉列表中的值
- comboBox加载颜色下拉列表框
- Flex ComboBox下拉列表不自动更新解决方法
- synchronized run()方法
- php 面向对象
- NOR型闪存与NAND型闪存的区别
- wpa_cli取命令函数
- iOS中设置导航栏标题的字体颜色和大小
- DataUtility 入门教程一[下拉列表:Combobox]
- 【UE】总结自己常用的UltraEdit使用技巧
- 树形视图和列表视图中的HitTest
- Oracle 12c RAC 集群使用DNS 实现 SCAN
- SQL JOIN 的用法
- 懒人调整log4net的配置文件的存放目录的方法
- zookeeper demo
- wpa_supplicant 初始化流程分析
- java线程池使用