I am trying the show the visualforce page with the pageblock section having id=table1 as hidden when it loads. When the user clicks the Execute button, then only the pageblock needs to be visible. I have assigned the rendered attribute to false. How can I dynamically assign the rendered attribute value to true, when the user clicks the execute button?
VF Page
<apex:page controller="query">
<apex:form >
<apex:pageBlock title="Queries">
Show All Stores <apex:commandButton value="Execute" action="{!sendQuery}" reRender="table1" />
</apex:pageBlock>
<apex:pageBlock id="table1" rendered="false">
<apex:pageBlockTable value="{!Indexes}" var="i">
<apex:column value="{!result[i].storeNo}" headerValue="Store No"/>
<apex:column value="{!result[i].storeName}" headerValue="Store Name"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>