zoukankan      html  css  js  c++  java
  • 在Form中使用pack\unpack方法

    假如你用过runbase类的话,你一定会对那里的pack/unpack机制印象深刻, 这种机制允许用户保存上一次输入的值,假如你也想让你的From拥有这种强大的功能的话,请参考加入以下6个方法。

     1 public dataAreaId lastValueDataAreaId()
     2 {
     3     return curExt();
     4 }
     5  
     6 private UserId lastValueUserId()
     7 {
     8     return curuserid();
     9 }
    10  
    11 private UtilElementType lastValueType()
    12 {
    13     return UtilElementType::Form;
    14 }
    15  
    16 private IdentifierName lastValueElementName()
    17 {
    18     return this.name();
    19 }
    20  
    21 private IdentifierName lastValueDesignName()
    22 {
    23     return '';
    24 }
    25  
    26 //this is called when no last value is retrieved
    27 void initParmDefault()
    28 {
    29 }
    30  
    31 //further, in Close method of the form:
    32 public void close()
    33 {
    34     super();
    35     //add saveLast method after super()
    36     xSysLastValue::saveLast(this);
    37 }
    38  
    39 //in init method of the form:
    40 public void init()
    41 {
    42     ;
    43  
    44     //Add getLast method before super()
    45     xSysLastValue::getLast(this);
    46     super();
    47 48 }
  • 相关阅读:
    鼠标经过显示边框
    特殊字符
    HTML 列表
    embed 引入网上视频
    锚点定位
    盒子阴影
    Map的四种遍历方式
    Glide的 java.lang.RuntimeException: Expected instanceof GlideModule, but found:X.GlideModule@2e4554f
    Java标识符的命名规则
    django入门与实践
  • 原文地址:https://www.cnblogs.com/Jinnchu/p/2663419.html
Copyright © 2011-2022 走看看