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
  • 相关阅读:
    fn project 试用之后的几个问题的解答
    fn project 扩展
    fn project 生产环境使用
    fn project 对象模型
    fn project AWS Lambda 格式 functions
    fn project 打包Function
    fn project Function files 说明
    fn project hot functions 说明
    fn project k8s 集成
    fn project 私有镜像发布
  • 原文地址:https://www.cnblogs.com/masb/p/2365402.html
Copyright © 2011-2022 走看看