0

I am trying to have a pageBlockTable, with one of the column having the name and a selectOption list, to filter the records, the problem is i'm unable to render both of them. Either the Header label is rendered or the selectOption is,

<apex:pageBlockSection title="Case List" showHeader="true" collapsible="false" columns="1">              

<apex:column width="50px">
    <apex:facet name="header">
        <apex:inputCheckbox onclick="cvCheckAllOrNone(this)" title="Toggle All Rows"/>
    </apex:facet>
        <apex:inputCheckbox Id="myId" value="{!casy.checked}"/>
</apex:column>
<apex:column headerValue="Next Step">                
    <apex:outputField value="{!casy.cas.Next_Step__c}"/> 
</apex:column>
<apex:column headerValue="Subject">                
    <apex:commandlink value="{!casy.cas.Subject}"/> 
</apex:column>
<apex:column headerValue="Created Date">                
    <apex:outputField value="{!casy.cas.CreatedDate}"/> 
</apex:column>
<apex:column headerValue="Created Reason">                
    <apex:outputField value="{!casy.cas.Reason}"/> 
</apex:column>

<apex:column >
    <apex:facet name="header">
        <apex:outputLabel >Priority</apex:outputLabel>

        <apex:selectList size="1" value="{!selectedFilterPriority}" title="Priority" > 
            <apex:selectOptions value="{!selectNewPriority}" />  
                <apex:actionSupport event="onchange" reRender="caseview" action="{!filterCaseRecords}"/> 
        </apex:selectList>
    </apex:facet>
    <apex:outputField value="{!casy.cas.Priority}"/> 
</apex:column>

Thanks, Maverick

2
  • Can you please post the complete pageBlockTable code? You can add/update the original question by clicking the edit link below it.
    – Saroj Bera
    May 15, 2017 at 11:28
  • Hi Saroj ... please find my edited, full pageBlockTable May 15, 2017 at 16:33

1 Answer 1

0

Remove the second "<apex:facet name="header">" and surround both the output label and the selectList within a <apex:panelGrid/>

<apex:column>
    <apex:facet name="header">
        <apex:panelGrid columns="2">
            <apex:outputLabel>Priority</apex:outputLabel>
            <apex:selectList size="1" value="{!selectedFilterPriority}" title="Priority" > 
                <apex:selectOptions value="{!selectNewPriority}" />  
                    <apex:actionSupport event="onchange" reRender="caseview" action="{!filterCaseRecords}"/> 
            </apex:selectList>
        </apex:panelGrid>
    </apex:facet>
    <apex:outputField value="{!casy.cas.Priority}"/> 
</apex:column>
6
  • Thanks Saumya...tried,.but no luck, still only selectOptions is rendered May 15, 2017 at 10:28
  • have you copied the code from this answer? Your vf page is compiled without error? In the new code you have commented both line 4 & 5 ? @MavsavSauve May 15, 2017 at 10:30
  • Saumya...yes, there is no compilation error and i have made the suggested changes. May 15, 2017 at 11:25
  • can anyone help please? May 16, 2017 at 9:36
  • 1
    Thanks Saumya..that works, but i already managed to achieve it by using <apex:OutputPanel> instead of <apex:panelGrid>. I have marked the solution as correct. Thanks for the help again...!!! May 18, 2017 at 6:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .