0
我有一個表單捕獲合同記錄並將其顯示在具有命令鏈接「編輯」標籤的數據表中。當我點擊「編輯」時,我希望填寫此合同數據的表單已被禁用,但合同編號字段已禁用。我試圖在Ajax onEvent標記中禁用它,並且它正在工作(即禁用)。但是,當使用ajax時,這些字段不會填充/顯示在表單中。如果我將其刪除,則只有合同編號纔可編輯。 這些是我的編輯標籤。如何在數據表的命令鏈接中使用ajax禁用表單域
<h:commandLink id="editLink" value="#{bundle.ListUnitEditLink}" >
<f:ajax onevent="disablePK" listener="#{contractManager.updateContract}" />
</h:commandLink>
這是我的支持bean。
public String updateContract() {
System.out.println("Now in UPDATECONTRACT method and serious debugging");
current = (Contract) items.getRowData();
this.newContractId=current.getContractid();
this.newContractDesc=current.getContractdesc();
this.newContractDt=current.getContractdt();
this.newContractAmt=current.getContractamt();
this.newContractStrtDt=current.getContractstrtdt();
this.newExpDuration=current.getExpduration();
this.newCtdBy=current.getCtdby();
this.newCtdOn=current.getCtdon();
this.lstUpdBy=current.getLstupdby();
this.lstUpdOn=current.getLstupdon();
return "contracts";
}
bean中的屬性被賦予正確的值,但它們不會出現在要編輯的窗體中。