<h:inputtext>字段中的更改应调用bean </h:inputtext>中的方法

时间:2014-03-25 17:55:54

标签: ajax jsf

这是新手,所以可能很简单。

每次输入/删除某些内容时,我都需要该字段来调用java bean方法。 它应该是这样的,但它会得到以下错误:

"<f:ajax> contains an unknown id 'input' - cannot locate it in the context of the component j_idt7"-

据我所知,Ajax execute attribute =“input”应该确保更新实例变量“input”。

这是xhtml文件中的相关代码:

<h:form>
        <div> Enter zipcode </div>
        <h:inputText >
            <f:ajax execute"input" render="out"> </f:ajax>
        </h:inputText>
        <h:outputText id="out"> #{postBean.by}</h:outputText>
    </h:form>

0 个答案:

没有答案
相关问题