You need to sign in to do that
Don't have an account?
Sony PSP
pagetable hide when there is no record and show when there is record
Hi folks i'm new with salesforce, do you have any idea on how can I hide this page table? meaning, onload, no records found, but after clicking the button search, it will display the pagetable result, my problem is it still displays the columns headers onload meaning still without any idea.
<apex:pageBlock title="Final Records">
<apex:outputPanel layout="block" styleClass="noRecords" rendered="{!conlist.size == 0}"><i> No Records </i>
</apex:outputPanel>
<apex:outputPanel layout="block" styleClass="noRecords" rendered="{!conlist.size == NULL}"><i> No Record </i>
</apex:outputPanel>
<apex:pageblocktable value="{!conlist}" var="con" id="pv">
<apex:column headerValue="Account Name>
<apex:outputlink value="https://ap1.salesforce.com/{!conlist.Account.id}">{!conlist.Account.Name}</apex:outputlink>
</apex:column>
<apex:column headerValue="Country}" value="{!conlist.Account.BillingCountry}" />
<apex:outputlink value="https://ap1.salesforce.com/{!conlist.id}"{!conlist.FirstName}</apex:outputlink>
</apex:column>
</apex:pageblocktable>
<apex:pageBlock title="Final Records">
<apex:outputPanel layout="block" styleClass="noRecords" rendered="{!conlist.size == 0}"><i> No Records </i>
</apex:outputPanel>
<apex:outputPanel layout="block" styleClass="noRecords" rendered="{!conlist.size == NULL}"><i> No Record </i>
</apex:outputPanel>
<apex:pageblocktable value="{!conlist}" var="con" id="pv">
<apex:column headerValue="Account Name>
<apex:outputlink value="https://ap1.salesforce.com/{!conlist.Account.id}">{!conlist.Account.Name}</apex:outputlink>
</apex:column>
<apex:column headerValue="Country}" value="{!conlist.Account.BillingCountry}" />
<apex:outputlink value="https://ap1.salesforce.com/{!conlist.id}"{!conlist.FirstName}</apex:outputlink>
</apex:column>
</apex:pageblocktable>
SalesFORCE_enFORCEr
Move your pageBlockTable inside an outputPanel which will be rendered when !conlist.size>0