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
di_zoudi_zou 

How do I get a View filter when using apex:pageBlockTable?

I am writing a custom page to display my cases and using an apex:pageBlockTable. When I render the page, it looks like this:

 

 

This is my code for it:

 

<apex:page standardController="Case" recordSetVar="Case" tabstyle="Case" sidebar="true" showHeader="true">
    <apex:pageBlock >
        <apex:pageBlockTable value="{!case}" var="c" rows="50" >
            <apex:column value="{!c.CaseNumber}" />
            <apex:column value="{!c.Priority}" />
            <apex:column value="{!c.Status}" />    
            </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>

 

How do I get a dropdown menu to select different views like in an apex:listView? What I am looking for is in the top left of this screenshot:

 

 

Here is the code for it:

 

<apex:component >
    <apex:stylesheet value="{!URLFOR($Resource.background_template)}"/>
    <apex:pageblock title="Cases">
    <!--<apex:pageBlockSection ></apex:pageBlockSection>-->
    <apex:outputPanel layout="block">
    <ul>
        <apex:ListViews type="Case">
        </apex:ListViews>
    </ul>
    </apex:outputPanel>
    </apex:pageBlock>
</apex:component>

So I want to get the View dop down that is in the apex:listView into an apex:pageBlockTable. How would I do that? Thanks.