i want a vf page that will render all the records through controller and the results will be render as html how please help me with some code and example for custom object.
Class:
public with sharing class Active {
public Active(ApexPages.StandardController controller) {
}
public List<Property__c> po { get; set; }
public Active(){
po = [SELECT Acceptance_Date__c, Payment_Type__c, Date_Sold__c, Deposit_Manager_Approved__c,
HardMoneyLoanMax__c, Buyer_Name_on_Contract__c ,Address__c, Property_Source__c,
Sales_Agent__c
FROM Property__c
WHERE Property__c.Property_Status__c = 'Active'];
}
}
VF page:
<apex:page renderas="html" standardController="Property__c"
extensions="Active" showHeader="false" sidebar="false">
<apex:form >
<apex:pageblock id="Property__c" title="PropertyDetails" >
<apex:pageblockTable value="{!Property__c}" var="a">
<apex:column value="{!a.County__c}"/>
<apex:column value="{!a.Date_Sold__c}"/>
<apex:column value="{!a.HardMoneyLoanMax__c}"/>
<apex:column value="{!a.Notes__c}"/>
<apex:column value="{!a.Property_Source__c}"/>
<apex:column value="{!a.Sales_Agent__c}"/>
<apex:column value="{!a.Date_Sold__c}"/>
<apex:column value="{!a.Full_Bonus__c}"/>
<apex:column value="{!a.Acceptance_Date__c}"/>
<apex:column value="{!a.Deposit_Manager_Approved__c}"/>
<apex:column value="{!a.Address__c}"/>
</apex:pageblockTable>
</apex:pageblock>
</apex:form>
</apex:page>