0
A
回答
0
在頁面
<apex:dataTable value="{!accountList}" var="a" >
<apex:column >
<apex:column headerValue="Action">
<apex:commandLink value="Save" action="{!save}" rerender="table" >
<apex:param name="Id" value="{!a.Id}" />
</apex:commandLink>
</apex:column>
</apex:dataTable>
控制器
List<accountwrapper> accountList = new List<accountwrapper>();
public class accountwrapper
{
public Account acc{get; set;}
public string id {get; set;}
public accountwrapper(Account a,string id)
{
this.acc = a;
this.id = id;
}
}
public PageReference save()
{
string accId = ApexPages.CurrentPage().getParameters().get('id');
for(accountwrapper accwrapper : accountList){
if(accwrapper.id == accId)
upsert accwrapper.acc;
}
return null;
}
相關問題
- 1. 從數據庫表中獲取數據
- 2. 從yui數據表中獲取數據
- 3. 從數據庫表中獲取整行
- 4. 從數據庫表中獲取行android
- 5. 從數據庫中獲取子類別數據到列表
- 6. 從頂點數據中獲取像素法線
- 7. 從數據庫中提取數據以獲取C3js圖表
- 8. 從div類獲取數據
- 9. Jquery DataTable從點擊按鈕獲取的行中獲取數據
- 10. 從表中爲每個主鍵獲取頂部數據
- 11. 從Ingot_JQuery_JqGrid獲取行數據
- 12. 從數據表獲取值
- 13. 獲取從數據表
- 14. 獲取數據從數據中的FormView
- 15. OpenGL(ES):高效地從紋理獲取頂點數據
- 16. 如何從Google/Bing地圖獲取頂點數據?
- 17. CodeIgniter從數據庫中獲取數據
- 18. Django從數據庫中獲取數據
- 19. 頂點緩衝區數據到數組頂點數據流
- 20. 從C列表中獲取數據#
- 21. 從行()函數獲取數據
- 22. 從3表中獲取數據
- 23. 從數據表中獲取字段值
- 24. 從psql數據庫中獲取數據
- 25. 從moodle數據庫中獲取數據
- 26. 從數據庫中獲取數據
- 27. 從數據集中獲取數據
- 28. Android從數據庫中獲取數據
- 29. 從html數據中獲取列數據
- 30. PDO從數據庫中獲取數據