You need to sign in to do that
Don't have an account?
Alex Valavanis 10
Custom controller for VF Page
Hello,
I need to create a custom controller since i my VF page shows only 20 records.
Can you please tell me how to do it?
The VF page created is the following.
<apex:page standardController="TaskTest__c" recordSetVar="records">
<apex:form >
<apex:pageBlock title="Task Summary" mode="inlineEdit">
<apex:pageBlockTable value="{! records}" var="rec">
<apex:column headerValue="Name" >
<apex:outputField value="{! rec.Name}" />
</apex:column>
<apex:column headerValue="Discription " >
<apex:outputField value="{! rec.Discription__c}" />
</apex:column>
<apex:column headerValue="Estimated Date for Task" >
<apex:outputField value="{! rec.Estimated_Date_for_Task__c}" />
</apex:column>
<apex:column headerValue="Owner" >
<apex:outputField value="{! rec.Owner__c}" />
</apex:column>
<apex:column headerValue="Status " >
<apex:outputField value="{! rec.Status__c}" />
</apex:column>
<apex:column headerValue="User Story " >
<apex:outputField value="{! rec.User_Story__c}" />
</apex:column>
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:pageBlockTable>
<apex:pageBlockButtons>
<apex:commandButton action="{!quicksave}" id="saveButton" value="Save" rendered="true"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="true"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
I need to create a custom controller since i my VF page shows only 20 records.
Can you please tell me how to do it?
The VF page created is the following.
<apex:page standardController="TaskTest__c" recordSetVar="records">
<apex:form >
<apex:pageBlock title="Task Summary" mode="inlineEdit">
<apex:pageBlockTable value="{! records}" var="rec">
<apex:column headerValue="Name" >
<apex:outputField value="{! rec.Name}" />
</apex:column>
<apex:column headerValue="Discription " >
<apex:outputField value="{! rec.Discription__c}" />
</apex:column>
<apex:column headerValue="Estimated Date for Task" >
<apex:outputField value="{! rec.Estimated_Date_for_Task__c}" />
</apex:column>
<apex:column headerValue="Owner" >
<apex:outputField value="{! rec.Owner__c}" />
</apex:column>
<apex:column headerValue="Status " >
<apex:outputField value="{! rec.Status__c}" />
</apex:column>
<apex:column headerValue="User Story " >
<apex:outputField value="{! rec.User_Story__c}" />
</apex:column>
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:pageBlockTable>
<apex:pageBlockButtons>
<apex:commandButton action="{!quicksave}" id="saveButton" value="Save" rendered="true"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="true"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Kindly Check the Below mentioned Thread.I hope it'll be Helpful for your Requirement.
https://developer.salesforce.com/forums/?id=906F0000000kITXIA2
Mark this as a Best Answer If it fits your Requirement!
Thanks,
DineshKumar Gopalakrishnan