2016-06-15 3 views
1

を提案する更新私はそこにしてください立ち往生私は画面にそれが変更された値を示し、プログラム的に任意のキーを参照することなく、レコードを変更しようとしていますが、テーブルのレコードに</p> <p>が変更されていない任意のキーを参照せずに、ADFで、プログラムのレコード、

私は以下のコードを含んでいます。

public String modifybank() { 
    String st=""+soc3.getValue(); 
    System.out.println(st); 
    String bname=""+soc4.getValue(); 
    String acno=""+it7.getValue(); 
    String amDef = "model.AppModule"; 
    String config = "AppModuleLocal"; 
    ApplicationModule ami = 
     Configuration.createRootApplicationModule(amDef, config); 
    AppModuleImpl am = (AppModuleImpl)ami; 
    ViewObjectImpl demo1 =am.getCmbBankdetailsModifyView1(); 
    DCBindingContainer bindings1 = 
     (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); 
    DCIteratorBinding branchItem; 
    branchItem = 
     (DCIteratorBinding)bindings1.get("CmbBankdetailsModifyView1Iterator"); 
    Row r2 = branchItem.getCurrentRow(); 
    System.out.println("acc"+r2.getAttribute("Accountno")); 
    r2.setAttribute("Accountno", acno); 
    r2.setAttribute("Bankname", bname); 
    r2.setAttribute("Status", st); 
    //demo1.insertRow(currentRow); 
    am.getDBTransaction().commit(); 
    //branchItem. 
    branchItem.executeQuery(); 

    return null; 
} 
+0

以内ManagedBean

DCBindingContainer bindingContainer = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); DCDataControl dc = bindingContainer.findDataControl("YourDataControl"); YourApplicationModuleImpl am = (YourApplicationModuleImpl)dc.getDataProvider(); am.yourClientInterfaceMethod(); 

には、私は正しくあなたの質問を理解していなかった場合は...ではイテレータ変更が表示されていますが、UIコンポーネント(テーブルでそれらを参照するか、いけない私を修正しますリスト)? – vssk

+0

ローカルdb @vssk – Subashri

+0

ログに何らかのエラーがないかチェックしましたか? – vssk

答えて

2

最初に、ManagedBeanクラスのを更新しないでください。 AMImplにメソッドを作成し、ClientInterfaceとして公開します。次に、あなたのYourApplicationModuleImpl

yourClientInterfaceMethod() { 
    // Get the row and update it and commit 
    // You will have Getter method for your ViewObject in the same class 
} 
関連する問題