zoukankan      html  css  js  c++  java
  • Shifting List Item Values From One List To Another In Oracle Forms

    Suppose you have two T-List items in form and you want  to shift element values from one list to another in Oracle Forms, here is the example given below for the same. Create two buttons also between list items as shown in picture in the bottom of this blog. Create one button with label ">" and another with label "<".

    When-button-pressed trigger code for button with label ">":

    declare
        n number;
        vval varchar2(100);
    begin
        --- replace rightsidelist with your list name placed on right side
        --- replace leftsidelist with your list name placed at left side
          n := get_list_element_count('rightsidelist');
          add_list_element('rightsidelist', n + 1, :leftsidelist, :leftsidelist);
          --- delete element
          n := get_list_element_count('leftsidelist');
          for i in 1..n loop
                vval := get_list_element_value('leftsidelist',i);
               if vval = :leftsidelist then
                       delete_list_element('leftsidelist',i);
               end if;
          end loop;
    end;

    When-button-pressed trigger for button with label "<":

    declare
        n number;
        vval varchar2(100);
    begin
          n := get_list_element_count('leftsidelist');
          add_list_element('leftsidelist', n + 1, :rightsidelist, :rightsidelist);      
          
          --- delete element
          n := get_list_element_count('rightsidelist');
          for i in 1..n loop
                vval := get_list_element_value('rightsidelist',i);
               if vval = :rigtsidelist then
                       delete_list_element('rightsidelist',i);
               end if;
          end loop;
    end;

    See also:
    Create List Item In Oracle Forms 
     

  • 相关阅读:
    陈欧代言
    location传值
    jsp中button传值
    电影
    排序
    比较两个字符,相等输出yes,不相等输出no
    查表求平方值
    数据库查询调优(SQL 2008)
    HelloWorld
    关于缓存 (这个自己也在慢慢学习,慢慢总结中,有路过的,求指点,赶紧不尽。。。)
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220188.html
Copyright © 2011-2022 走看看