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 }
  • 相关阅读:
    pycharm 快捷键
    jquery .on
    javaweb项目的优化
    python笔记
    git上解决代码冲突(merge版)
    OpenERP里面继承的用法
    OpenERP新手易犯错误之res.model
    bootstrap 仿实例
    深入理解Binder(二),Binder是什么?
    深入理解Binder(一),从AIDL谈起
  • 原文地址:https://www.cnblogs.com/Jinnchu/p/2663419.html
Copyright © 2011-2022 走看看