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从数据库中获取数据