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 
     

  • 相关阅读:
    Java Applet实现五子棋游戏
    CrawlScript脚本语言实现网络爬虫
    Eclipse集成Git的实践
    以图表形式分析和统计数据
    爬虫抓取分页数据的简单实现
    爬虫的简单实现
    使用htmlparser爬虫技术爬取电影网页的全部下载链接
    使用webcollector爬虫技术获取网易云音乐全部歌曲
    百度地图API-覆盖物
    百度地图API-控件
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220188.html
Copyright © 2011-2022 走看看