0

上記のフォームで契約レコードを取得し、コマンドリンクの「編集」タグを持つデータテーブルに表示します。[編集] をクリックすると、フォームにこの契約データが入力されますが、[契約番号] フィールドは無効になります。Ajax onEvent タグでこの無効化を試みていますが、機能しています (無効化)。ただし、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 のプロパティには正しい値が与えられていますが、編集するフォームには表示されません。

4

1 に答える 1

0

render=@all を ajax タグに追加して問題を整理しました

 <h:commandLink id="editLink"  value="#{bundle.ListUnitEditLink}"  
                                       actionListener="#{contractManager.updateContract}">
         <f:ajax   onevent="disablePK"   render="@all"  />

 </h:commandLink>
于 2012-08-07T07:57:26.310 に答える