简体   繁体   English

<f:ajax>根本不渲染

[英]<f:ajax> does not render at all

This is my Facelet: 这是我的Facelet:

<h:inputText id="input" value="#{managedBean.runner.postnr}" maxlength="4" size="4">
    <f:ajax execute="@this" onevent="blur" render="output" />
</h:inputText>
<h:outputText id="output" value="#{managedBean.placeFromPostNR}"/>

I'm trying to autoupdate outputText with a value from managedBean.placeFromPostNR when the user exit's the inputText . 当用户出口的inputText时,我尝试使用managedBean.placeFromPostNR的值自动更新outputText。 But this does not work at all. 但这根本不起作用。

Here's my managedBean.placeFromPostNR code: 这是我的managedBean.placeFromPostNR代码:

public String getPlaceFromPostNR(){
    return db.getPlaceFromPostNR(runner.getPostnr());
}

This method is never invoked, have some printlines as test. 永远不要调用此方法,需要一些打印行作为测试。

I've even tried with setting <h:outputText id="output" value="#{managedBean.runner.postnr}"/> and setting onevent="keyup" to check if my methods which gives the error. 我什至尝试设置<h:outputText id="output" value="#{managedBean.runner.postnr}"/>并设置onevent="keyup"来检查我的方法是否给出错误。 But this doesn't work either. 但这也不起作用。

The onevent attribute is invalid. onevent属性无效。 It should be event . 应该event

<f:ajax execute="@this" event="blur" render="output" />

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

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