+ Start a Discussion
lucky25lucky25 

please write the custom controller for this viualforce page

<apex:page Controller="con2" >
<apex:form >
<apex:pageMessages />
<apex:pageBlock title="Book data to Store" mode="edit">


<!--This is the first section-->
<apex:pageBlockSection Title="Book Information" columns="1">

<apex:pageBlockSectionItem >
<apex:outputText value="BookName"/>
<apex:inputtext value="{!bk.Name}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="Authorname"/>
<apex:inputText value="{!bk.Authorname__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="price"/>
<apex:inputText value="{!bk.price__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="EmailId"/>
<apex:inputText value="{!bk.Emailid__c}"/>
</apex:pageBlockSectionItem>
</apex:pageblocksection>

<apex:pageBlockButtons location="top">

<apex:commandButton value="save" action="{!save}" />
<apex:commandButton value="Reset" action="{!Reset}" />

</apex:pageBlockButtons>
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="Delete" action="{!delete_selected}" />
<apex:commandButton value="Edit" action="{!Edit}" />
</apex:pageBlockButtons>

<apex:pageBlockTable value="{!bks}" var="b" >
<apex:column headerValue="Action">
<apex:inputCheckbox value="{!b.action__c}" />
</apex:column>
<apex:column value="{!b.Authorname__c}"/>
<apex:column value="{!b.Name}"/>
<apex:column value="{!b.price__c}"/>
<apex:column value="{!b.Emailid__c}"/>
</apex:pageBlockTable>

</apex:pageBlock>
</apex:form>
</apex:page>