public with sharing class CustomAccountSetController {
public List<Account> selectedAccs {get;set;}
public CustomAccountSetController(ApexPages.StandardSetController controller) {
List<Account> accs = controller.getSelected();
this.selectedAccs = [SELECT Id, Name FROM Account WHERE Id IN :(new Map<Id, Account>(accs)).keySet()];
}
public void execute() {
system.debug('execute');
}
}
public class myControllerExtension {
private final Account acct;
// The extension constructor initializes the private member
// variable acct by using the getRecord method from the standard
// controller.
public myControllerExtension(ApexPages.StandardController stdController) {
this.acct = (Account)stdController.getRecord();
}
public String getGreeting() {
return 'Hello ' + acct.name + ' (' + acct.id + ')';
}
}