Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/357.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Oracle adf添加问题_Java_Oracle Adf - Fatal编程技术网

Java Oracle adf添加问题

Java Oracle adf添加问题,java,oracle-adf,Java,Oracle Adf,伙计们 我在Oracle ADF中制作这个简单的加法函数 其中,我有三个输入文本字段,前两个用于输入数字,第三个用于输出,还有一个按钮,我在其中编写了计算加法运算的代码。在Adf中创建Adf Fusion应用程序后的页面上 这是你的密码 <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html> <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http

伙计们 我在Oracle ADF中制作这个简单的加法函数 其中,我有三个输入文本字段,前两个用于输入数字,第三个用于输出,还有一个按钮,我在其中编写了计算加法运算的代码。在Adf中创建Adf Fusion应用程序后的页面上 这是你的密码

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html>
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="PageAdd.jsf" id="d1">
        <af:form id="f1">
            <af:inputText label="input1" id="it1" binding="#{Mbean.input1}" autoSubmit="true"/>
            <af:inputText label="input2" id="it2" binding="#{Mbean.input2}" autoSubmit="true"/>
            <af:inputText label="output" id="it3" binding="#{Mbean.output}" autoSubmit="true"/>
            <af:button text="Submit" id="b1" action="#{Mbean.b1_action}"/>
            <af:selectBooleanRadio text="selectBooleanRadio 1" label="Label 1" id="sbr1"/>
        </af:form>
    </af:document>
    <!--oracle-jdev-comment:preferred-managed-bean-name:Mbean-->
</f:view>
虽然我的应用程序能够获取这些值,甚至可以将它们相加,但无法在第三个输入文本字段中显示它们,这是我无法做到的
我不熟悉这个工具和Java语言,请帮助我。

在“输出”组件上添加如下部分触发器属性:

<af:inputText label="output" id="it3" binding="#{Mbean.output}" autoSubmit=“true" partialTriggers=“ b1"/>  

首先输入1,然后输入2
autoSubmit=“True”
。 然后对输出进行
partialTriggers=“it1 it2”
。 为按钮设置
partialSubmit=“True”


如果什么也没发生,试着写
this.output.setValue(V)

输出后。设置值(v)

添加这行代码
AdfFacesContext.getCurrentInstance().addPartialTarget(输出)


然后在页面的内部输出中将属性
autoSubmit
设置为
“true”

我删除了单选按钮这是一个错误部分触发器需要指向按钮的id。我编辑了帖子,请再次检查。我尝试过这样做,但在按下按钮后,我得到了一个错误,即Java.faces.FacesException和Java.lang.Nullpointer异常。Nullpointer异常是代码中的一个错误。如果您不知道如何自己修复NPE,那么您可能不适合为生活编写代码。获取Java.faces.faces异常和Java.faces.el.evaluation.Exception、Java.lang.NullPointer.Exception或尝试编写partialTriggers=“it1 it2”而不是PratialTrigger=“it1 it2”
<af:inputText label="output" id="it3" binding="#{Mbean.output}" autoSubmit=“true" partialTriggers=“ b1"/>