zoukankan      html  css  js  c++  java
  • 使文本字段支持F7录入

    在项目中有时需要对一个文本型的字段,在录入时以F7的形式进行选择。可通过如下方法实现:

     1  final KDBizPromptBox prmtstatus = new KDBizPromptBox();
     2  prmtstatus.setQueryInfo("com.kingdee.eas.shine.basedata.app.StatusQuery");
     3  prmtstatus.setVisible(true);
     4  prmtstatus.setEditable(false);
     5 
     6  prmtstatus.setDisplayFormat("$number$");
     7  prmtstatus.setEditFormat("$number$");
     8  prmtstatus.setCommitFormat("$number$");
     9 
    10  ExtendParser parserStatus = new ExtendParser(prmtstatus);
    11  prmtstatus.setCommitParser(parserStatus);
    12 
    13  KDTDefaultCellEditor status_CellEditor = new KDTDefaultCellEditor(prmtstatus);
    14  ObjectValueRender status_OVR = new ObjectValueRender();
    15  status_OVR.setFormat(new BizDataFormat("$number$"));
    16 
    17  this.kdtEntries.getColumn("reserve2").setEditor(status_CellEditor);
    18  this.kdtDetail.getColumn("reserve2").setEditor(status_CellEditor);
    19  this.kdtSub.getColumn("reserve2").setEditor(status_CellEditor);
    20 
    21  this.kdtEntries.getColumn("reserve2").setRenderer(status_OVR);
    22  this.kdtDetail.getColumn("reserve2").setRenderer(status_OVR);
    23  this.kdtSub.getColumn("reserve2").setRenderer(status_OVR);
    24 
    25  prmtstatus.addDataChangeListener(new DataChangeListener() {
    26 
    27          public void dataChanged(DataChangeEvent e) {
    28                  if (e.getNewValue() != null) {
    29                          prmtstatus.setValue(e.getNewValue().toString());
    30                  }
    31          }
    32  });
    View Code
  • 相关阅读:
    SharePoint的安装配置
    onkeypress与onkeydown及 oncopy和onpaste 事件区别详细说明
    sql Server 的基本函数
    iOS 错误 之 http请求
    iOS 错误及解决汇总
    iOS 开源库 之 AFNetWorking 2.x
    linux 下 tomcat 之 配置静态资源路径
    iOS 之 Block Variable
    iOS 协议
    #import与@class的区别
  • 原文地址:https://www.cnblogs.com/masb/p/2365402.html
Copyright © 2011-2022 走看看