+ Start a Discussion
TheRealistTheRealist 

Need help with the PageblockButton

Hi 
I am trying to include two buttons in the pageblock like when Button SHOW is clicked content/records should be displayed and when button HIDE is clicked the content/records in the block should be hidden.i am not able to achieve this,my code is not throwing any error but buttons are not even being displayed on the page .Help will be appreciated,
below is my controller ,vfpage for the reference and screen shot.
User-added image


Controller:

public with sharing class DisplayQueryList{ 
public List<Project__c> Records {get; set;} 
public DisplayQueryList(){ 
Records = 
[select Name, client_Type__c,client__c,Client__r.High_Priority__c,Client__r.Quotation__c from Project__c  where client_Type__c   ='Diamond']; 
}
public PageReference buttonB() {
     return null;
  }

  public PageReference buttonA() {
      return null;
  }

  public PageReference displayButton() {

      return null;
  } 
}

Vf Page:

<apex:page controller="DisplayQueryList"> 
 <Apex:form >
    <apex:pageBlock title="Records"> 
        <apex:pageBlockTable value="{!Records}" var="Record"> 
            <apex:column > 
                <apex:facet name="header">Project Name</apex:facet> 
                <apex:outputText value="{!Record.Name}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Client Type</apex:facet> 
                <apex:outputText value="{!Record.client_Type__c   }"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">Client MD</apex:facet> 
                <apex:outputText value="{!Record.Client__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">Quotation</apex:facet> 
                <apex:outputText value="{!Record.Client__r.Quotation__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">High Priority</apex:facet> 
                <apex:outputText value="{!Record.Client__r.High_Priority__c}"/> 
            </apex:column>
             <apex:actionsupport event="onclick" action="{!buttonA}" rendered="true"/>
             <apex:commandbutton action="{!buttonA}" Onclick="show" value="SHOW" rendered="{selectId=='show'}"/>    
        </apex:pageBlockTable> 
    </apex:pageBlock>
   </Apex:form> 
</apex:page>