Oracle ADF LOV值绑定到多个文本文件

时间:2017-03-17 07:49:48

标签: oracle oracle-adf lov

我有一个用例,我创建了一个包含3个值的视图对象,即LOC_CODE,LOC_DESC,CITY_DESC。现在,在我的ADF格式中,我希望以这样的方式显示所有3个值,以便用户可以选择LOC_CODE From Popup(LOV)并休息两个文件LOC_DESC& CITY_DESC应相应更改。目前弹出窗口显示所有3个值,但是当我选择行并单击“确定”按钮时,它仅填充1个文本框中的LOC_CODE。 以下是相同的情景: enter image description here

3 个答案:

答案 0 :(得分:0)

得到了解决方案。只需要添加一个文本框或拖放到相应的字段附近并将其与所需的绑定对象绑定。对于例如在这种情况下,LOC_DESC& CITY_DESC在我的数据控制中可用作DefLoc&包含SQL的DefCity用于获取相应的描述值。现在我需要拖放DefLoc& DefCity和绑定会自动完成,或者仅检查绑定值。

答案 1 :(得分:0)

您必须将valuechangelistener添加到位置代码中。 set autosubmit true。

现在使用以下代码支持bean:

    public void valuechangelistener(ValueChangeEvent valueChangeEvent) {
    valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    JUCtrlListBinding list = (JUCtrlListBinding)bindings.get("LOC_CODE");
    String selectedValue = (String)list.getAttributeValue();
    list.getListIterBinding().setCurrentRowWithKeyValue(selectedValue);
    Row currRow = list.getListIterBinding().getCurrentRow();

    if (currRow != null) {
        bndloc_desc.setValue(currRow.getAttribute("LOC_DESC"));
        bndcity_desc.setValue(currRow.getAttribute("CITY_DESC"));

    }
}

现在将部分触发器设置为位置desc和city desc,ID为LOC_CODE。 完成后,您将获得所需的结果。

实施后更新。

答案 2 :(得分:0)

在我的案例中JDeveloper 12.2.1.3.0

<resourceProperties 
    xmi:id="J2EEResourceProperty_1501875435118" 
    name="plugins" type="java.lang.String"
    value="{
        pluginClass=Management,xuName=default,protocol=jmx},
        {pluginClass=DVS},
        {pluginClass=HTDS},
        {pluginClass=Event,EventDestinationType=Topic,EventDestinationConnectionFactoryName=jms/WbeTopicConnectionFactory,EventDestinationName=jms/eventDestination},
        {pluginClass=com.mypackage.MyPlugin,foo=bar,fiz=baz}" 
    required="false" 
    ignore="false" 
    confidential="false" 
    supportsDynamicUpdates="false"/>