jonas
jonas

Reputation: 1652

<f:ajax> does not render at all

This is my 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.placeFromPostNRwhen the user exit's the inputText. But this does not work at all.

Here's my managedBean.placeFromPostNR code:

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. But this doesn't work either.

Upvotes: 1

Views: 553

Answers (1)

BalusC
BalusC

Reputation: 1108587

The onevent attribute is invalid. It should be event.

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

Upvotes: 1

Related Questions