带有Ajax事件的SelectOneRadio不会触发

时间:2011-07-21 09:27:25

标签: jsf jsf-2

我开发了一个网站。我想使用<h:selectOneRadio><f:ajax>来更改页面中表单的内容。我搜索了很多网站但找不到。选择单选按钮时,重新显示表单。我怎样才能做到这一点 ? 我的代码是:

<h:selectOneRadio value="#{guest.rdSelected}">
    <f:selectItems value="#{guest.uyruk}" />
    <p:ajax render="lblTcPasaport txtName txtSurname" event="click"
        listener="#{guest.changeTcPasaportFields}" />
</h:selectOneRadio>
<h:outputText id="lblTcPasaport" value="#{guest.nameOfLblTcPasaport}" />
<h:inputText id="tcNo" value="#{guest.tcNo}">

    <f:ajax event="blur" render="lblErrorMessage txtName txtSurname"
        listener="#{guest.getNameSurname}" />
</h:inputText>


Ad
<h:inputText id="txtName" value="#{guest.name}"
    disabled="#{guest.isNameSurnameDisabled}">
    <f:validator validatorId="validateNameSurname" />
</h:inputText>

Soyad
<h:inputText id="txtSurname" value="#{guest.surname}"
    disabled="#{guest.isNameSurnameDisabled}">
    <f:validator validatorId="validateNameSurname" />
</h:inputText>

0 个答案:

没有答案