我正在使用primefaces 3.0.0.M2庫。在此庫中,存在<p:selectOneMenu>
元素。我的問題是,當我使用<p:ajax>
標記與listener
,update
和process
屬性,偵聽器方法不會被調用,但update
和process
工作正常。這裏是我的代碼:primefaces ajax與偵聽器,更新和進程屬性,偵聽器方法不會執行
<h:form prependId="false" id="frmNewRecord">
<h:panelGrid columns="4" style="font-size: 10px;width:840px">
Öğrenci No <p:inputText value={newRecord.azerKimKayit.ogrenciNo}" maxlength="11">
<p:ajax event="blur" update="frmNewRecord" listener="#{newRecord.getStudent}" process="frmNewRecord" />
</h:form>
而且我支持bean是(necassary法):
public void getStudent() {
azerKimKayit = azerKimKayitBo.findByOgrNo(azerKimKayit.getOgrenciNo());
}
您的代碼片段似乎不正確或過於簡化。我沒有看到一個關閉'p:input'和'h:panelGrid'。 –
我只複製了必要的代碼片段。 – olyanren