zoukankan      html  css  js  c++  java
  • Adding Value To Combo List at Runtime in Oracle Forms

    You want to add a value in Combo List item in Oracle Forms, by typing it in combo list box text area. Here is the example is given for the same, you can write following block in When-Validate-Item trigger for the combo box item:

    Write the following code in When-Validate-Trigger of combo box:

    DECLARE
       total_list_count      Number (10);
       loop_index_var        Number (10)                  := 1;
       list_element          Varchar2 (50);
       list_element_value    Varchar2 (50);
       list_element_to_add   Varchar2 (50);
       list_value_to_add     Varchar2 (50);
       element_match         Varchar2 (5)                 := 'FALSE';
       value_match           Varchar2 (5)                 := 'TRUE';
       list_id               item                         := Find_item ('YOURBLOCK.COMBOLIST1');
    BEGIN
       total_list_count := Get_list_element_count (list_id);
       List_element_to_add := :YOURBLOCK.COMBOLIST1;

       For I In 1 .. TOTAL_LIST_COUNT
       LOOP
          list_element := Get_list_element_value (list_id, loop_index_var);
          loop_index_var := loop_index_var + 1;

          IF list_element_to_add = list_element
          Then
             element_match := 'TRUE';
          END IF;

          EXIT When list_element = list_element_to_add;
       END LOOP;

       list_value_to_add := list_element_to_add;

       IF element_match = 'FALSE'
       Then
          Add_list_element (list_id, total_list_count + 1, list_element_to_add, list_value_to_add);
       END IF;

    --- element added...

    EXCEPTION
       When form_trigger_failure
       Then
          RAISE;
       When Others
       Then
          Message (SQLERRM);
    END;

     
  • 相关阅读:
    pre 强制换行
    code标签和pre标签的定义
    angularJS绑定数据中对标签转义的处理二 与pre标签的使用
    angularJS绑定数据中对标签转义的处理
    html特殊字符
    js switch的使用 ng-switch的使用方法
    JS转换HTML转义符,防止javascript注入攻击,亲测可用
    MVC,MVP 和 MVVM 的图示 转自阮一峰先生网络日志
    AngularJs ngReadonly、ngSelected、ngDisabled
    你应该知道的jQuery技巧
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220164.html
Copyright © 2011-2022 走看看