简体   繁体   English

在ADF Mobile中使用ID以编程方式获取输入文本值

[英]Get Input text value programatically using id in ADF mobile

I get Input Text value programatically using id in ADF mobile like ADF. 我在ADF移动版(如ADF)中使用id来以编程方式获取输入文本值。

Below code is use in adf for get value for Input text programatically. 下面的代码是在使用自动进稿器为输入文本编程方式获取价值。

FacesContext facesContext = FacesContext.getCurrentInstance();
UIViewRoot root = facesContext.getViewRoot();
RichInputText inputText = (RichInputText)root.findComponent("it1");
String val=inputText.getValue();

But I can't get value like that in ADF mobile. 但是我无法在ADF移动版中获得像这样的价值。

Try to access the value from the page definition, instead of finding the component from the root. 尝试从页面定义访问值,而不是从根目录查找组件。

DCIteratorBinding iterator = (DCIteratorBinding)dcBindings.get("SomeIteratorId"); 
String attribute = (String) iterator.getCurrentRow().getAttribute("SomeAttributeName");

You can use the utility AdfmfJavaUtilitiy to get the value of ELs. 您可以使用实用程序AdfmfJavaUtilitiy来获取EL的值。 For example see https://blogs.oracle.com/shay/entry/adf_mobile_update_through_web 例如,请参见https://blogs.oracle.com/shay/entry/adf_mobile_update_through_web

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM