You need to sign in to do that
Don't have an account?
Ratheven Sivarajah
Return a a list from a controller and use it in a VF page
Hey I was able to do a SOQL and store it in a list. How do I return it and use it in my VF page. Thank you in advance
Controller:
public with sharing class TechnologyProduct {
public TechnologyProduct() {
List <Technology_Product__c> result = [SELECT Id, Name FROM Technology_Product__c where Account__c='00105000002oNIyAAM'];
}
}
Controller:
public with sharing class TechnologyProduct {
public TechnologyProduct() {
List <Technology_Product__c> result = [SELECT Id, Name FROM Technology_Product__c where Account__c='00105000002oNIyAAM'];
}
}
Best Answer chosen by Ratheven Sivarajah
Shri Raj
To return the list from the controller, you can add a getter method to return the list. In the Visualforce page, you can reference the getter method to display the data