• TABLE中动态设置poplist的值跟着当前行的某些列动态变化


    核心方法

     OAAdvancedTableBean table = (OAAdvancedTableBean)webBean.findChildRecursive("TimeEntryTbl");     
     OAMessageChoiceBean elePoplist = (OAMessageChoiceBean)table.findChildRecursive("ElementSelect");     
     elePoplist.setListVOBoundContainerColumn(0, table, "EmployeeGroupName");     
     elePoplist.setListVOBoundContainerColumn(1, table, "PeriodEndDate");     
     elePoplist.setListVOBoundContainerColumn(2, table, "AssignmentId");     
     elePoplist.setPickListCacheEnabled(false); 

    问题扩展。

    在页面中有添加新一行的操作,如何使添加的新一行中的poplist的值集跟着当前行的LOV返回的值变化而变化。

    核心思路:

    在MessageChoice中绑定poplist取值来源的时候不要使用dependent poplist,而是使用View Instance。

    有些关联list是需要上下文限制的,如 省市选择,甚至还是在table中。2个poplist通过pvo实例化,在根据事件,刷新VO是不行的,因为是多行,而且局部事件是早于poplist数值获取的,这样也没办法加限制条件。【摘自oraclearea51 的Sudhakar Mani文章】

    视图定义

     

     

    控件设置

    代码控制

    ProcessRequest

    ProcessFormRequest

    AM

    //视图定义
    CountryVO
    select Meaning ,LookupCode from fnd_lookup_values_vl where lookup_type='CHOLA_COUNTRY'
    StateVO
    select Meaning ,LookupCode from fnd_lookup_values_vl where lookup_type='CHOLA_State' and tag= :1
    
    //控件设置
    ID Country
    Picklist View Definition:chola.oracle.apps.fnd.poplist.server.CountryVO
    Picklist View Instance :CountryVO1
    Picklist Display Attribute:Meaning
    Picklist Value Attribute:LookupCode
    ActionType - fireParialAction
    Event - country
    
    ID State
    Picklist View Definition:chola.oracle.apps.fnd.poplist.server.StateVO
    Picklist View Instance :StateVO1
    Picklist Display Attribute:Meaning
    Picklist Value Attribute:LookupCode
    ActionType - fireParialAction
    
    //代码控制
    //processRequest
    
    OAAdvanceTableBean advTable = (OAAdvanceTableBean)webBean.findChildRecursive("ResultAdvTable");
    OAMessageChoiceBean statePoplist = (OAMessageChoiceBean)advTable.findChildRecursive("State");
    statePoplist.setListVOBoundContainerColumn(0,advTable,"Country");
    
    //processFormRequest
    
    if("country".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))){
        am.invokeMethod(initStateVOQuery);
    }
    
    //AM
    
    public void statePoplist(){
        StateVOImpl vo = (StateVOImpl) getStateVO1();
        if(vo==null){
            MessageToken[] errorTokens= {new MessageToken("OBJECT_NAME","CountryVO1")};
            throw new OAException("AK","FWK_TBX_OBJECT_NOT_FOUND",errorTokens);
        }
        vo.executeQuery();
    }

    参考文章:

    Poplist Dependent on an LOV not working in AdvTable - Add another row

    the Dependent Poplist section

    Dynamic Poplist Empty when setListVOBoundContainerColumn is called.

  • 相关阅读:
    java 获取pdf内容
    超快的maven setting文件
    MQTT-CN MQTT协议中文版
    Another maybe monad library for ruby
    [Game-0001] 新手引导逻辑梳理
    [Erlang-0016][aque_tcp] 一个 Erlang TCP 组件
    [Erlang-0015][Lager] Erlang日志框架Lager简析
    LeetCode.1217-交换芯片(Play with Chips)
    LeetCode.1207-唯一的元素出现次数(Unique Number of Occurrences)
    LeetCode.1200-最小绝对值差(Minimum Absolute Difference)
  • 原文地址:https://www.cnblogs.com/huanghongbo/p/4605496.html
Copyright © 2020-2023  润新知