I need to display a pageblock on click of a command button. I tried re rendering the block however its not displaying the block on clicking command button. Please help.
<apex:page>
<apex:form >
<tr>
<td style="padding-left: 30px"><b>Portfolio Details</b></td>
<td></td>
<tr>
<td colspan="2" width="70%">
<br/>
<table width="35%">
<tr>
<td>
<apex:commandButton action="{!display}" value="Account Summary" reRender="AccountSummarypageBlock" status="status"/>
</td>
</tr>
</td>
</tr>
</table>
<br/>
<apex:outputPanel id="AccountSummarypageBlock" >
<apex:actionstatus id="status" startText="loading...">
<apex:facet name="stop">
<apex:pageBlock >
<apex:pageBlockSection title="Portfolio Holding Details">
<apex:pageBlockSectionItem >
<apex:pageBlockTable value="{!listTransaction}" var="trans">
<!--<apex:column value="{!trans.Client_ID__c}"/>-->
<apex:column value="{!trans.Category__c}"/>
<apex:column value="{!trans.Quantity__c}"/>
<apex:column value="{!trans.Amount__c}"/>
<apex:column value="{!trans.Gain_Loss__c}"/>
<apex:column value="{!trans.Yield__c}"/>
<!--<apex:column value="{!trans.Product__r.Price__c}"/>-->
</apex:pageBlockTable>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:facet>
</apex:actionstatus>
</apex:outputPanel>
</td>
</tr>
</tr>
</apex:form>
</apex:page>
My Controller
public class Transactionrecord{
public Transactionrecord(customtable controller) {
}
transient public list<Transaction__c >listTransaction{get;set;}
public Transactionrecord()
{
getTransaction();
}
public void getTransaction()
{
listTransaction=new list<Transaction__c >([select name, Account__c, Amount__c, Category__c, Client_ID__c, CMP__c, Gain_Loss__c, Order_Type__c, Product__c, Product_Code__c, Quantity__c, Transaction_Date__c, Yield__c from Transaction__c]);
}
public PageReference display() {
return null;
}
}