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
Naga Balji BNaga Balji B 

I have 2 pageblocks. in 1st pageblock(input) for make changes on records.like insrt,delete,update and 2nd pageblock(output) will display what are the changes we have done in 1st pageblock? without refreshing total page...I want to refresh only 2nd block?

Deepak Pandey 13Deepak Pandey 13
Hi Naga

 in class take boolean value and use rendered in page block.
this link will helped you-   http://www.infallibletechie.com/2012/10/hide-and-show-multiple-pageblocks-in.html
Naga Balji BNaga Balji B
Hi Deepak Pandey,
I need to refresh pageblock 2 ....I think we use for that Rerender.But it not works properly.Please send me any sample code of rerender using min 2 pageblocks

Thanks,
BNB
Deepak Pandey 13Deepak Pandey 13
public class acctestsample
{
    public boolean hide1{get;set;}
     public boolean hide2{get;set;}
    public Backup__c acc{get;set;}
    public list<Backup__c> lst {get;set;}
    
    public acctestsample()
    { 
    hide1 =false;
 hide2 = true;
        acc=new Backup__c(); 
    }

    public void savedata() 
    {
    hide1 =true;
 hide2 = false;
        insert acc;
    }
     public void lstofdata()
     {
         hide1 =false;
 hide2 = true;
     lst = [select id,name from Backup__c];
     }
}

and vf pages-
1st pageblock rendered="{!hide1 }"
1st pageblock rendered="{!hide2 }"