function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hildegard OlsenHildegard Olsen 

How to add inline edit to VF page and pagination function?

How to add inline edit to VF page and pagination function? (for Title,Email and Birthdate)

Thanks!
 
<apex:page Controller="AccContact">
  <apex:form >
      
      <apex:pageBlock >
  <apex:pageBlockTable value="{!acclst}" var="a">
      
   
 <apex:column headerValue="Name">
  <apex:commandLink action="{!selacc}">
  <apex:param name="conlst" value="{!a.id}"/>
  <apex:outputText value="{!a.name}"/>
  </apex:commandlink>
  </apex:column>
  <!--accounts-->
   </apex:pageBlockTable>
    <apex:pageBlockTable value="{!accconts1}" var="a">
    <apex:column headerValue="Account Name" value="{!a.Name}"/>
    <!--contacts-->
    <apex:column headerValue="List contacts">
   <apex:pageBlockTable value="{!a.contacts}" var="c">
       
          <apex:column headerValue="Title">
  <apex:outputText value="{!c.title}"></apex:outputText>
  </apex:column>
  
       
    <apex:column headerValue="First Name">
  <apex:outputText value="{!c.firstname}"></apex:outputText>
  </apex:column>
       
  <apex:column headerValue="Last Name">
  <apex:outputText value="{!c.lastname}"></apex:outputText>
  </apex:column>
   
   <apex:column headerValue="Email">
  <apex:outputText value="{!c.email}"></apex:outputText>
  </apex:column>

     <apex:column headerValue="Birthdate">
  <apex:outputText value="{!c.birthdate}"></apex:outputText>
  </apex:column>
       
  
 </apex:pageBlockTable> <!-- End contact-->
 </apex:column>
 </apex:pageBlockTable><!--end account-->
  </apex:pageBlock>
         

  </apex:form>
</apex:page>
 
public with sharing class AccContact {

    public list<contact> conlst { get; set; }

   // public contact c { get; set; }
   /* public  void getSelacc() {
    }*/

    public list<account> accconts1 { get; set; }

    public PageReference selacc() {
    string getid=apexpages.currentpage().getparameters().get('conlst');
         accconts1=[select id,name,(select id,lastname,firstname,email,title,birthdate from contacts)  from account where id=:getid ];
            system.debug(accconts1);
      return null;
    }


    public List<Account> acclst { get; set; }
   public  AccContact (){
     acclst=[select id,name  from account ];
     system.debug(acclst);
   
   }

}


       

 
Best Answer chosen by Hildegard Olsen
SoundarSoundar
Hi Hildegard Olsen,

Please Refer This link also...
 
http://sfdcsrini.blogspot.com/2014/08/inline-editing-in-visualforce-page.html

Regards,
Soundar​

All Answers

SoundarSoundar
Hi Hildegard Olsen,

Please refer the below link for know more about inline edit. Defenitely You will be get a good idea after read this link.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_inline_editing.htm

Regards,

Soundar​
SoundarSoundar
Hi Hildegard Olsen,

Please Refer This link also...
 
http://sfdcsrini.blogspot.com/2014/08/inline-editing-in-visualforce-page.html

Regards,
Soundar​
This was selected as the best answer
Hildegard OlsenHildegard Olsen
I solved this issue, thanks!