You need to sign in to do that
Don't have an account?

Reg: How to get the fields of custom object into the pageblock table?
I'm having a custom object called record. i have to get the fields of that in the page block table. My code is below:
Controller:
Public record__c record {get;set;}
VF page:
<apex:pageblock>
<apex:pageblocktable value="{!record}" var="ct">
<apex:column headerValue="Year" style="width:102px;" headerClass="centertext">
<apex:inputField value="{!ct.Year__c}" >
</apex:inputField>
</apex:column>
<apex:column headerValue="Amount" style="width:102px;" headerClass="centertext">
<apex:inputField value="{!ct.Amount__c}" style="width:180px;">
</apex:inputField>
</apex:column>
</apex:pageblocktable>
</apex:pageBlock>
But in the pageblock table i'm getting only the header , but not the input fields. Please let me know what i have to do??/
Change your controller as follows
You need to initialze your attribute.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.